Order Methods
CreateAdditionalRequiredDocuments
Used to initiate the process of requesting additional required shipping document such as the German Customs EAD document. This API does not return the document itself, rather it initiates the process to receive the document from the authorities, for example the EAD document from German Customs, using SendAdditionalRequiredDocumentsToMerchant (Global-e to Merchant)
.
Security Requirements
Headers:
JWT (optional)
MerchantGUID (optional)
Method/URL
POST https://api-<merchantName>-<environmentName>.global-e.com/additional-required-documents
Parameters
Request Parameters
Name | Type | Description | Mandatory |
---|---|---|---|
| Array of | Yes |
Response Parameters
Name | Type | Description |
---|---|---|
| Class ResponseInfo | Indicates if an API call was successful or not and why. |
Examples
Request Example
{ "Orders": [ { "OrderId": "GE123874638GB", "TrackingNumbers": [ "trackingnumber1", "trackingnumber2" ] } ] }
Response Examples
Sample 1
Example of success, with HTTP Code 200:
{ "Success":true }
Sample 2
Example of error with HTTP Code 400:
{ "Code": "B001", "Message": "Order ID not found", "Description": "The Order GE12345US provided by the merchant does not exist." }
Error Codes
Code | Description |
---|---|
202 | Successful request - request was accepted, and document will be provided when ready. |
4xx | Error - the request not successful, incorrect data was sent by the merchant. Reasons for failure:
|
5xx | Error - the request not successful due to an internal error on Global-e side. |
Classes for CreateAdditionalRequiredDocuments API
CreateOrderRefund (Merchant to Global-e)
CreateOrderRefund (OrderRefundDetails
OrderRefund, List<RefundProduct
> refundProductList)
The CreateOrderRefund API Issues a refund for the order specified in the orderRefund
argument. Optionally, this method may include the list of RefundProducts
to refund. If orderRefund.TotalRefundAmount
is not specified, it is converted to the end customer’s currency based on the RefundAmount
or OriginalRefundAmount
values for the RefundProduct
s in the refundProductsList
and their respective Product VAT rates.
If orderRefund.FullRefund
is specified as true:
A full refund is created.
refundProductsList
should not be provided, otherwise, the call fails with an error "Full refund requested but list of RefundProduct is not empty."The
orderRefund.TotalRefundAmount
andorderRefund.OriginalTotalRefundAmount
values which are provided in the call are ignored and recalculated based on the order details.
ELSE
If product.RefundAmount
AND product.OriginalRefundAmount
are not specified then:
product.RefundAmount
ANDproduct.OriginalRefundAmount
are calculated based on the order product price.orderRefund.TotalRefundAmount
is recalculated based on the products refund amount plus the sum of all non-product related refund components(
orderRefund.ServiceGestureAmount
+orderRefund.DutiesAmount
+orderRefund.ShippingAmount
)
If we don’t perform a full refund or the refund request/refund item quantity is not valid, we return a JSON response according to the Merchant Account Settings ReturnResponseOfErrorInfoStruct
value.
if this Merchant Account Settings is true, the JSON response is in the ErrorInfo
struct.
Otherwise, the response is in the ResponseInfo
struct.
The Merchant Account Settings ‘SetAllPrepaidReturnsWithRefund
’ supports all prepaid returns includes free by Admin and free by Merchant that the return IDcwill be sent to NotifyOrderRefund
and wiil link the OrderRefund
with the return.
Method/URL
POST https://{globale_api_domain}/Order/CreateOrderRefund
Request Parameters
Name | Type | Description | Mandatory |
---|---|---|---|
orderRefund | Class OrderRefundDetails | Order refund details for the specified order | Yes |
refundProductsList | List <RefundProduct> | List of | Note that this products list is mandatory if the refund is issued for Products. |
Response Parameters
Name | Type | Description | Mandatory |
---|---|---|---|
responseInfo | Class ResponseInfo | Response information for the API call. | No |
Examples
Request
[ { "CartItemId": "134643", "RefundQuantity": "1", "RefundAmount": "42", "RefundReason": { "OrderRefundReasonCode": "RETURN", "Name": "RETURN" }, "RefundComments": "" }, { "CartItemId": "134644", "RefundQuantity": "1", "RefundAmount": "58", "RefundReason": { "OrderRefundReasonCode": "RETURN", "Name": "RETURN" }, "RefundComments": "" } ]
Error Response
{ "Code": "1006", "Error": "Cartitemid 1 exceeded the available products quantity to refund", "Description": "After Method ValidateProducts. refund amount: 67.8700 , available loyalty points: 0.0000" }
Error Codes
The ErrorInfo
includes a field code containing a numeric value.
Code | Description |
---|---|
1001 | Order already fully refunded or cancelled |
1002 | Requested refund amount is greater than the remaining amount available for a refund for this order |
1003 | Invalid quantity |
1004 | Refund request must contain at least one refund component |
1005 | Cartitemid {currentRefundProduct.CartItemId} doesn’t exists for order {orderRefundObj.OrderId |
1006 | CartItemId {currOrderProduct.CartItemId} exceeded the quantity of the available products to refund |
Classes for CreateOrderRefund
Out of Stock
The Out of Stock (OOS) feature allows merchants to indicate products as out-of-stock through the CreateOrderRefund
API without specifying the refund amount.
This feature enabled the following actions:
Modification of the product quantity.
Recalculation of duties and taxes.
Adjustment of shipping costs (if there are no flat rates).
The update of associated documents.
The Issuing of a product refund.
If all the products within an order are indicated as out of stock, the order status is changed to 'Cancelled by Merchant'.
Mapping
Out-of-stock products must be assigned a pre-mapped refund reason in order to be recognized by the system.
Mapping is established between the merchant's refund reasons and Global-e's internal reasons, as specified in the MapMerchantOrderRefundReasons
table,
Examples of codes in the MapMerchantOrderRefundReasons
table
Code | Refund Reason |
---|---|
5 | Out of Stock |
14 | Out-of-Stock Item |
23 | Product out of stock |
Refunds
The out-of-stock quantities are indicated by using the product quantity field.
Any provided amount associated with a product with an out-of-stock refund reason is ignored.
If out-of-stock is provided for a product that a product appeasement is made for, only the remaining amounts are refunded.
Validation Errors
The following situations cause the amend and refund operation to fail and return an error in the CreateOrderRefund
response.
Situation | Error Message |
---|---|
Combining various refund reasons, including out-of-stock and non-out-of-stock reasons, within a single | "Issuing a refund for out-of-stock products alongside other refund reasons is not permitted. Please include any out-of-stock products in a separate call without other refund reasons." |
If the quantity of out-of-stock products exceeds the quantity of remaining products. | "The number of out-of-stock products exceeds the number of remaining products." |
If the quantity of out-of-stock products is zero or not provided. | "Out-of-stock quantity missing or zero. Please provide a valid quantity." |
If a product is declared as out-of-stock for an order in a not allowed status. Note: Out-of-stock products can only be declared for pre-shipped products. | “The current order status %Order status name% does not permit the declaration of out-of-stock products”. |
Example (partial payload):
[ { "CartItemId":"39493377065032-0", "RefundQuantity":1, "RefundAmount":79.00, "RefundReason":{ "OrderRefundReasonCode":"Out of stock", "Name":"Out of stock" } }, { "CartItemId":"39638402039880-1", "RefundQuantity":1, "RefundAmount":0.00, "RefundReason":{ "OrderRefundReasonCode":"Out of stock", "Name":"Out of stock" } } ]
DispatchConsolidatedShipment
DispatchConsolodatedShipment
(GetOrdersManifestRequest request
)
Returns a list of details for the orders.
Can function with a list of Global‑e order IDs:
SAMPLE
Body:
{ "OrderIds": ["GE2794623GB", "GE2794622GB", "GE2794621GB"], “OuterBoxesAmount”: 1 }
URL:
https://{server_name}/Order/DispatchConsolidatedShipment
ACCEPTS
GetOrdersManifestRequest request
Full post data list of order Ids and outer boxes amount
RETURNS
OrderDocumentsResponse class.
DispatchOrders
DispatchOrders
(GetOrdersManifestRequest request
)
Returns manifest documents.
Can function with either a list of global-e order ids or a list of merchant order ids. If the optional hubCode
parameter is specified, then only the parcels or orders that were sent from the specified hub will be dispatched:
Body:
{ "HubCode": "Store", "OrderIds": ["GE2794623GB", " GE2794622GB", " GE2794621GB"] }
Or
{ "OrderIds": ["2794623", " 2794622", " 2794621"] }
URL:
https://{server_name}/Order/DispatchOrders
ACCEPTS
GetOrdersManifestRequest request
Full post data list of order IDs
RETURNS
OrderDocumentsResponse
class
GetOrdersDetails
GetOrdersDetails
(OrderDetailsFilter filter
)
Returns a list of orders and their details.
Can function with a list of Global‑e order IDs:
SAMPLE
Body:
{ "OrderIds": ["GE2794623GB", "GE2794622GB", "GE2794621GB"] }
URL:
https://{server_name}/Order/GetOrdersDetails
ACCEPTS
OrderDetailsFilter filter
Full post data list of Global‑e order Ids
RETURNS
List of Merchant.Order classes.
GetShippingDocuments
Returns the existing shipping documents for the requested order, and also shipping documents and parcels for the orders specified in the request.
Method/URL
https://{server_name}/Order/GetShippingDocuments
Usage
There are two usages:
The request is issued with an empty list of parcels, and/or exceptions (no
hubCode
is provided). Here all the existing shipping documents for the requested order are returned.The request includes a list of parcels for the
OrderId
/MerchantOrderId
, and/or the list of exceptions. It returns:- Updates to order status and Delivery Quantities for the products and Merchant’s internal Delivery Reference Number if applicable. Optionally, it can include Exceptions to report on out-of-stock items and items that will be shipped later on. In addition, there is an option to add tracking information on each parcel or for the entire order.
- Update the status of orders and parcels received in the Hub. If the optional
hubCode
is provided, assign the specified parcels for the specified hub. The feature is used when an order includes parcels to be sent from different hubs.Optional: You can add information to be used later when the shipping request is placed to FedEx. This is implemented by adding the
ShippingAdditionalInformation
property in the order level or the parcel level (not both).When the shipping is handled by 3PL, depending on the merchant configuration, the
GELabel
may be set to 4, to print a Global-e label at the hub.
Parameters
Request Body Parameters
Name | Type | Description | Mandatory (Y/N) |
---|---|---|---|
| Full post data including Note: | Y |
Response Body Parameters
Name | Type | Description |
---|---|---|
| Class OrderDocumentsResponse | Receive class object OrderDocumentsResponse. |
Sample Request Body for the first usage
{ "OrderId": "GE123874638GB", "MerchantOrderID": "100018322", "DeliveryReferenceNumber": "123756483", "IsCompleted": true, "Parcels": [], "Exceptions": [] }
Sample Request Body for the second usage
{ "HubCode": "Store", "OrderId": "GE123874638GB", "MerchantOrderID": "100018322", "DeliveryReferenceNumber": "123756483", "IsCompleted": true, "Parcels": [{ "ParcelCode": "123454321", "Products": [{ "DeliveryQuantity": 1, "CartItemId": "12365", "ProductCode": "121212" }, { "DeliveryQuantity": 2, "CartItemId": "12376", "ProductCode": "131313" } ], "TrackingDetails": { "TrackingNumber": "111111122666" }, /*Add ShippingAdditionalInformation at the order level or at the package level, not both.*/ "ShippingAdditionalInformation": [{ "name": "ITNNumber", "value": "12345" } ] } ], "Exceptions": [{ "CartItemId": "12366", "ProductCode": "121213", "ExceptionType": 1 }, { "CartItemId": "12367", "SKU": "SKU121214", "ExceptionType": 2, "ExpectedFulfilmentDate": "2018-01-18" } ], "TrackingDetails": { "TrackingNumber": "111111122666" }, /*Add ShippingAdditionalInformation at the order level or at the package level, not both.*/ "ShippingAdditionalInformation": [{ "name": "ITNNumber", "value": "12345" } ] }
SendOrderToMerchant (Global-e to Merchant)
Note
This API is part of Global-e's extensions and plug-ins. Merchants do not need to implement this API unless a custom integration is required.
This API posts the new order or updates the existing order on the merchant’s site.
When implementing a Global-e extension or plug-in, this method is required to create the customer order in the merchant’s system, clear the user’s basket, and optionally, reserve the inventory.
If
order.PaymentDetails
are provided, this method also performs the payment and returns the currency and amount actually charged in theMerchant.ResponseInfo
.If additional shipping documents are required for merchants that are shipping the order themselves, then it is indicated in
AdditionalRequiredDocuments
. In that case, the merchant should delay the fulfillment until the documents are ready and provided to the merchant in theSendAdditionalRequiredDocumentsToMerchant
webhook.
Security Requirements
Merchant GUID - In request payload (required)
Custom header (optional)
IP whitelist (optional)
HTTP Basic Authentication (optional)
JWT (optional)
Retry Logic
There is no retry upon a merchant failure response or timeout. The timeout period is 5 minutes but can be adjusted if necessary. Merchant failure responses or timeouts will trigger an alert to the Global-e NOC team for manual review. Requests that fail to initiate from Global-e side will trigger a retry once a minute for up to 3 attempts, after which an alert will trigger for manual review.
Method/URL
POST https://www.merchant-site-domain.com/order-update-create-url
Parameters
Request
Requests can contain more parameters than listed.
Name | Type | Description | Mandatory |
---|---|---|---|
order | Object Merchant.Order | Information about the order. |
Response
Note
Some values are encoded and require the merchant to decode them, for example URLs, addresses, emails, and phone numbers.
Name | Type | Description | Mandatory |
---|---|---|---|
ResponseInfo | Object Merchant.ResponseInfo | Indicates if an API call was successful or not and why. |
Objects for SendOrderToMerchant API
Examples
Request Sample 1
{ "ClearCart": true, "UserId": null, "CurrencyCode": "ILS", "Products": [{ "Attributes": [{ "AttributeKey": "color", "AttributeValue": "GREY" } ], "ProductName":"Ribbed Modal Tank Flare Pants Set", "Sku": "7290012491726", "Price": 21.55, "Quantity": 8, "VATRate": 18, "InternationalPrice": 4.84, "CartItemId": "11007", "Brand": null, "Categories": [] } ], "Customer": { "EmailAddress": "[email protected]", "IsEndCustomerPrimary": false, "SendConfirmation": false }, "PrimaryShipping": { "FirstName": "GlobalE", "LastName": "GlobalE", "MiddleName": null, "Salutation": null, "Company": "GlobalE", "Address1": "21/D, Yegi'a Kapayim st. Yellow building - Floor 1", "Address2": "Test Address2", "City": "Petach Tikva", "StateCode": "NN", "StateOrProvince": null, "Zip": "4913020", "Email": "[email protected]", "Phone1": " 972 73 204 1384", "Phone2": "Test Phone2", "Fax": "Test Fax", "CountryCode": "IL", "CountryName": "Israel", "CollectionPointId": "030749" }, "SecondaryShipping": { "FirstName": "John", "LastName": "Smith", "MiddleName": null, "Salutation": null, "Company": null, "Address1": "Amishav%2024", "Address2": null, "City": "Paris", "StateCode": null, "StateOrProvince": null, "Zip": "66666", "Email": "John.Smith%40global-e.com", "Phone1": "98756344782", "Phone2": null, "Fax": null, "CountryCode": "FR", "CountryName": "France", "CollectionPointId": null }, "ShippingMethodCode": "globaleintegration_standard", "Discounts": [{ "Name": "Shipping discount provided by globale", "Description": "Auto calculated according to products", "Price": 35.31, "DiscountType": 2, "VATRate": 18, "CouponCode": null, "InternationalPrice": 6.58 "MetaData":"" } ], "InternationalDetails": { "CurrencyCode": "EUR", "TotalPrice": 64.88, "TransactionCurrencyCode": "EUR", "TransactionTotalPrice": 64.88, "TotalShippingPrice": 32.74, "TotalDutiesPrice": 0, "ShippingMethodCode": "2", "ShippingMethodName": "EMS", "PaymentMethodCode": "1", "PaymentMethodName": "Visa", "DutiesGuaranteed": false, "OrderTrackingNumber": null, "OrderTrackingUrl": "http://www.israelpost.co.il/itemtrace.nsf/mainsearch?openform", "OrderWaybillNumber": null, "OrderWaybillUrl": null, "ShippingMethodStatusCode": "0", "ShippingMethodStatusName": "undefined", "CardNumberLastFourDigits": "7854", "ExpirationDate": "2023-06-30", "TotalVATAmount": 11.14 }, "PaymentDetails": null, "PrimaryBilling": { "FirstName": "GlobalE", "LastName": "GlobalE", "MiddleName": null, "Salutation": null, "Company": "GlobalE", "Address1": "21/D, Yegi'a Kapayim st. Yellow building - Floor 1", "Address2": null, "City": "Petach Tikva", "StateCode": null, "StateOrProvince": null, "Zip": "4913020", "Email": "[email protected]", "Phone1": " 972 73 204 1384", "Phone2": null, "Fax": " 972 73 204 1386", "CountryCode": "IL", "CountryName": "Israel", "CollectionPointId": null }, "SecondaryBilling": { "FirstName": "John", "LastName": "Smith", "MiddleName": null, "Salutation": null, "Company": "GlobalE", "Address1": "Amishav%2024", "Address2": null, "City": "Paris", "StateCode": null, "StateOrProvince": null, "Zip": "66666", "Email": "John.Smith%40global-e.com", "Phone1": "972500000", "Phone2": null, "Fax": null, "CountryCode": "FR", "CountryName": "France", "CollectionPointId": null }, "OrderId": "GE927127", "StatusCode": "N/A", "MerchantGUID": "abcdabcd-abcd-abcd-abcd-abcdabcdabcd", "CartId": "9936", "MerchantOrderId": null, "PriceCoefficientRate": 1, "OrderCreationSource": 0, "IsMoto": true, "ModifiedProduct": "G007163737" "AdditionalRequiredDocuments": [ { "DocumentTypeCode": "11 (value from enum)", "DocumentTypeName": "EAD", }, ] }
Request Sample 2
{ "MerchantGUID": "abcdabcd-abcd-abcd-abcd-abcdabcdabcd", "OrderId": "GE12345678GB", "CartId": "56004460", "UserId": "cecofzj348wdhbr98UbNNDa", "CurrencyCode": "GBP", "PriceCoefficientRate": 1.340000, "RoundingRate": 0.8774285714285714285714285714, "UrlParameters":"[{\"Key\":\"associateOrder\",\"Value\":\"false\"}}], "OrderCreationDate":"2024-05-29T12:33:08.443", "EffectiveFXRate":0.944130024000, "WebStoreInstanceCode": "GlobalEDefaultStoreInstance", "DiscountedShippingPrice": 8.77, "DoNotChargeVAT": false, "AllowMailsFromMerchant": true, "CustomerComments": null, "IsFreeShipping": false, "FreeShippingCouponCode": null, "ShipToStoreCode": null, "InternationalDetails": { "CurrencyCode": "USD", "TotalPrice": 38.00, "TransactionCurrencyCode": "USD", "TransactionTotalPrice": 38.0000, "TotalShippingPrice": 15.3600, "DiscountedShippingPrice": 10.0000, "DutiesGuaranteed": false, "TotalDutiesPrice": 0.0000, "PaymentMethodCode": "1", "PaymentMethodName": "Visa", "ShippingMethodCode": "608", "ShippingMethodName": "DHL Express Worldwide", "ShippingMethodTypeCode": "Express", "ShippingMethodTypeName": "Express Courier (Air)", "PaymentTransactionReference":"89288", "DeliveryDaysFrom": 3, "DeliveryDaysTo": 4, "OrderTrackingNumber": null, "OrderTrackingUrl": "https%3a%2f%2fwww2.bglobale.com%2fOrder%2fTrack%2fmZyd%3fOrderId%3dGE4874348GB%26ShippingEmail%3djsmith%40merchant.com", "CardNumberLastFourDigits": "7854", "ExpirationDate": "2023-06-18" }, "Products": [{ "CartItemId": "10367295488044", "Sku": "2410016114", "Price": 30.7100, "Quantity": 1, "VATRate": 20.000000, "InternationalPrice": 35.0000, "RoundingRate": 0.8774285714285714285714285714, "IsBackOrdered": false, "BackOrderDate": null, "DiscountedPrice": 24.57, "InternationalDiscountedPrice": 28.0000, "GenericHSCode":"392800", "GiftMessage": null, "MetaData": { "Attributes": [{ "AttributeKey": "giftnotemessage", "AttributeValue": "Hello, world" }, { "AttributeKey": "giftnotefont", "AttributeValue": "FONTTYPE1" }, { "AttributeKey": "WRTY", "AttributeValue": "Warranty card" } ] } } ], "Discounts": [{ "DiscountType": 1, "Name": "20% off", "Description": "20% off all non-sale items.", "Price": 6.1400, "VATRate": 20.000000, "InternationalPrice": 7.0000, "CouponCode": "GO20", "DiscountCode": "Email_Sign_up-20%_off", "ProductCartItemId": "10367295488044", "LoyaltyVoucherCode": null }, { "DiscountType": 2, "Name": "Shipping discount for fixed price", "Description": "Shipping discount provided from fixed price range 24663", "Price": 4.7000, "VATRate": 20.000000, "InternationalPrice": 5.3600, "CouponCode": null, "DiscountCode": null, "ProductCartItemId": null, "LoyaltyVoucherCode": null } ], "PrimaryShipping": { "FirstName": "Jenny", "LastName": "Smith", "MiddleName": null, "Salutation": null, "Company": null, "Address1": "12+E+11th+St", "Address2": null, "City": "New+York", "StateCode": "NY", "StateOrProvince": "New York", "Zip": "10003", "Email": "jsmith%40merchant.com", "Phone1": "0123456789", "Fax": null, "CountryCode": "US", "CountryCode3": "USA", "CountryName": "United States" }, "SecondaryShipping": { "FirstName": "GlobalE", "LastName": "East Midlands Airport", "MiddleName": null, "Salutation": null, "Company": null, "Address1": "96a, Beverley Road", "Address2": "East Midlands Airport\r\nGE12345678GB", "City": "Derby", "StateCode": "NN", "StateOrProvince": null, "Zip": "DE74 2SA", "Email": "[email protected]", "Phone1": "01332 818723", "Fax": null, "CountryCode": "GB", "CountryCode3": "GBR", "CountryName": "United Kingdom" }, "PrimaryBilling": { "FirstName": "Jenny", "LastName": "Smith", "MiddleName": null, "Salutation": null, "Company": null, "Address1": "12+E+11th+St", "Address2": null, "City": "New+York", "StateCode": "NY", "StateOrProvince": "New York", "Zip": "10003", "Email": "jsmith%40merchant.com", "Phone1": "0123456789", "Fax": null, "CountryCode": "US", "CountryCode3": "USA", "CountryName": "United+States" }, "SecondaryBilling": { "FirstName": "GlobalE", "LastName": "UK Limited", "MiddleName": null, "Salutation": null, "Company": "GlobalE", "Address1": "45 Leather Lane", "Address2": null, "City": "London", "StateCode": null, "StateOrProvince": null, "Zip": "EC1N 7TJ", "Email": "[email protected]", "Phone1": "+ 44 (0)808 258 0300", "Fax": "+ 44 (0)203 514 7171", "CountryCode": "GB", "CountryCode3": "GBR", "CountryName": "United Kingdom" }, "OrderPaymentMethods":[ { "PaymentMethodGuid":"23ATEM329IF9493", "IsGiftCard":false, "GiftCardFields":null, }], "AdditionalRequiredDocuments": [ { "DocumentTypeCode": "11", "DocumentTypeName": "EAD", } ] }
SendAdditionalRequiredDocumentsToMerchant (Global-e to Merchant)
SendAdditionalRequiredDocumentsToMerchant
( SendAdditionalRequiredDocumentsToMerchantRequest
request)
Posts the required shipping documents of the order to the Merchant’s site
This notification informs the Merchant that the documents previously listed in SendorderToMerchant
notification (under AdditionalRequiredDcouments), initiated by calling CreateAdditionalRequiredDcouments
, are ready.
The document's content is included in this notification.
Security:
IP whitelist
Secret GUID
Authorization header
Method/URL
POST https://www.merchant-site-domain.com/send-additional-required-documents-url
Examples
Request:
{ "OrderId": "Sample order id", "MerchantOrderId": "Sample order id from the merchant’s system", "CountryCode": "US", "AdditionalRequiredDocuments": [ { "TrackingNumber" "98789723874839", "DocumentData": "base 64 string", "URL": "URL do download document", "DocumentTypeCode": "11", "DocumentTypeName": "EAD", "DocumentExtension": "pdf", "DocumentReference": "24DE85123822923B8", "CreationDateTime": "2024-01-30T10:55:21" } ] }
Response:
{ "StatusCode": "200", "Success": "true", "Message": "...", "ErrorCode": "...", "ErrorText": "..." }
UpdateOrderDispatch
Note
LEGACY: For reference only. These methods do not need to be implemented by Merchants anymore.
Updates the order status and Delivery Quantities for the products, as well as Merchant’s internal Delivery Reference Number, if applicable. Optionally, you can include the list of parcels for this order shipment to the Global-e hub.
Method/URL
https://api_domain]/Order/UpdateOrderDispatchCreateOrder
Parameters
Request
Name | Type | Description | Mandatory |
---|---|---|---|
OrderStatus | Class OrderStatusDetails | Status details to update for the order specified | |
parcelsList | List <Parcel> | List of Parcel objects for this order’s shipment to the Global‑e hub | |
productsList | List Product | List of Product objects (specified in the request body) |
Response
ResponseInfo
class
Name | Type | Description | Mandatory |
---|---|---|---|
ResponseInfo | Class ResponseInfo | Response details for API call |
Example
Response
[{ "ProductCode": "1020872", "Name": "Lanolin", "Description": "Breast%20Feeding%20Ointment", "GenericHSCode": "", "OriginCountryCode": "", "Weight": "1.0000", "Height": null, "Length": null, "Volume": "60", "ImageURL": "\/a\/3\/a3c9ef_ece3bec0467310603bce72e9a58e33d3.jpg", "ImageHeight": "", "ImageWidth": "", "ListPrice": "25.0000", "OriginalListPrice": "17.7000", "SalePrice": "15.0000", "OriginalSalePrice": "17.7000", "VATRateType": { "VATRateTypeCode": 1, "Name": "Low", "Rate": "18.0000" }, "Brand": { "BrandCode": "7", "Name": "Brand2" }, "Categories": [{ "CategoryCode": "3", "Name": "Maternity" } ], "DeliveryQuantity": 1 } ]
UpdateOrderDispatchV2
UpdateOrderDispatchV2
(UpdateOrderDispatchRequest request
)
Updates the order status and Delivery Quantities for the products, as well as the Merchant’s internal Delivery Reference Number, if applicable. You can also add tracking information on each parcel or on the entire order. Optionally, you can include the list of Parcels with Products for this order shipment to the Global-e hub, exceptions to report on out-of-stock items, and items that will be shipped later on.
URL:
https://{server_name}/Order/UpdateOrderDispatchV2
Accepts
UpdateOrderDispatchRequest request
Full post data including OrderId
, Exceptions, and Parcels with Products for the call.
Note: OrderId
attribute can accept the value of an OrderID (unique order identifier) or MerchantOrderId (unique merchant order identifier).
Returns
ResponseInfo
class
Sample
RequestBody:
{ "OrderId": "GE123874638GB", //Can accept either OrderID or MerchantOrderID "MerchantOrderID": "100018322", "DeliveryReferenceNumber": "123756483", "IsCompleted": false, "Parcels": [{ "ParcelCode": "123454321", "Products": [{ "DeliveryQuantity": 1, "CartItemId": "12365", "ProductCode": "121212" }, { "DeliveryQuantity": 2, "CartItemId": "12376", "ProductCode": "131313" } ], "TrackingDetails": { "TrackingNumber": "111111122666" } } ], "Exceptions": [{ "CartItemId": "12366", "ProductCode": "121213", "ExceptionType": 1 }, { "CartItemId": "12367", "SKU": "SKU121214", "ExceptionType": 2, "ExpectedFulfilmentDate": "2018-01-18" } ], "TrackingDetails": { "TrackingNumber": "111111122666" } }
UpdateOrderProducts
The UpdateOrderProducts
API lets you update the order product's metadata and country of origin after the order has been created.
Method
POST https://{server_name}/Order/UpdateOrderProducts
Parameters
Request Body Parameters
Field | Type | Mandatory | Description |
---|---|---|---|
| String | Yes | Global‑e unique identifier or merchant unique identifier of the order that requires updating. The |
| String | Yes | The type of metadata update. Currently, |
| List | Yes | The list of products included in the order that requires updating. |
Product
The product details and attributes. The following provides a partial structure dedicated to the update order.
Product
class
Field | Type | Mandatory | Description |
---|---|---|---|
| String | Conditional | The SKU code used to identify the product on the Merchant’s site. Conditional: Either the |
| String | Conditional | The identifier of the cart item on the Merchant’s site Conditional: Either the |
| String | No (optional) | 2-char ISO country code of the product’s country of Origin. The Merchant’s country will be assumed if not specified. |
| No (optional) | Used to hold additional product data such as customer-defined product attributes. Important: The attributes provided in ProductMetaData are added when the attribute key does not exist, or the attributes are updated with new values when attributes with the same keys already exist |
ACCEPTS
UpdateOrderProductsRequest class
string
OrderId
Global‑e unique identifier or Merchant unique identifier of the order that requires updating.
List <Product>
Products
The list of products that require updating.
string
MetaDataUpdateType
The type of metadata update. Must be set to "
Merge
".
RESPONSE
If there is an update, the API returns a successful response.
ResponseInfo class
bool
Success
Indicates if the respective API method call was successful. Success property value may be only TRUE. Otherwise,
ErrorInfo
will be returned instead (like in any API method, as described above in this document).string
Reason
(optional) Text that optionally describes the reason for Success status.If there is no update, the API returns a failure. See the Error Code section below.
ERROR CODE
When providing an invalid or non-existent value, the Global-e returns an “ErrorInfo” with an appropriate error message.
Code | Error | Description |
---|---|---|
D001 |
| The provided order ID does not exist |
D002 |
| The provided cart item ID does not exist in this order |
D003 |
| The provided product code does not exist in this order |
D004 |
| The provided origin country code does not exist in the system |
D005 |
| The provided value for product meta-data is empty or null |
UpdateOrderStatus (Inbound)
UpdateOrderStatus
( OrderStatusDetails orderStatus)
The method sends order status updates from the merchant’s site to Global-e whenever a status is changed (for example, when the order fulfilment or shipping notifications are triggered).
Important
When the request is made by the merchant to cancel the order, the merchant must make sure to add the cancellation reason so that Global-e can notify the customer.
Method/URL
POST https://www.merchant-site-domain.com/order-status-update-only-url
Parameters
Request
Name | Type | Description | Mandatory |
---|---|---|---|
orderStatus | Class OrderStatusDetails | Object OrderStatusDetails contains information about the status of the order on the merchant's site.. | Yes |
Response
Name | Type | Description |
---|---|---|
ResponseInfo | Class Merchant.ResponInfo | Response details regarding API call. |
Example
Request
{ "OrderId": "00010000100000000020", "StatusCode": "canceled", "MerchantGUID": "abcdabcd-abcd-abcd-abcd-abcdabcdabcd" }