General API Reference
Conventions
The following conventions apply to all APIs described in this section, except Merchant APIs initiated by Global‑e as clients.
When executing an API call, the caller must include the mandatory
merchantGUID
parameter obtained from Global-e. If themerchantGUID
is invalid (or was not sent), the HTTP response returns error code 401 (Unauthorized). The only exception is that when the API methods are called from the client, they are authenticated by the client session.Unless stated otherwise, all API calls are executed with the
POST
method.All API calls must include
content-type: application/json
request header.Data returned from any API methods refers to the specified merchant only. For example, the Countries method returns the list of Countries supported only for the specified merchant.
All API methods may optionally return the following headers:
Cache-Control: public
max-age=x
These headers indicate the recommended client (merchant) side caching interval for the data returned by the respective call unless otherwise stated in a specific class or method definition below.
On failure, all API calls return an
ErrorInfo
object containing the error code, error message, and error description.All Merchant’s RESTful API calls return
Merchant.ResponseInfo
. In case of an error, the HTTP response status must be not equal to 200.Merchant’s RESTful API will be called with
content-type:application/json
For example:
{"OrderId":"0001000010000020","MerchantGUID":"abcdabcd-abcd-abcd-abcd-abcdabcdabcd"}