Skip to main content

Documentation Portal

General API Reference

Conventions

The following conventions apply to all the API methods in this document, except for the Merchant API methods that are being consumed by Global‑e as a client.

  • When executing a Global-e API method, the caller must include a mandatory merchantGUID parameter obtained from Global-e. If the merchantGUID is no longer valid (or was not sent), the HTTP response code is 401 (Unauthorized).

    The only exception to this requirement is when API methods that are called from the client which will be authenticated by the client session. 

  • Unless stated otherwise, all API method calls must be executed with the POST method.

  • All API method calls must include content-type: application/json request header.

  • Data returned from any API method refers to the specified merchant only. For example, the Countries method returns the list of Countries supported for the specified merchant only.

  • All API method calls may optionally return the following headers:

    • Cache-Control: public

    • max-age=x

      These headers are used to 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 method calls return an ErrorInfo object containing an error code, error message and error description. In this case, the HTTP response status must not be equal to 200.

  • All Merchant’s RESTful API method 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"}