Skip to content

Get shipping address

Returns delivery address for the order

GET https://api.gelato.com/v2/order/{{orderReferenceId}}/address

Request example:

$ curl -X GET \
   https://api.gelato.com/v2/order/{{MyOrderId}}/address \
   -H 'X-API-KEY: {{apiKey}}'

Response example:

{
    "id": "d6bcf17f-3a48-4ec8-888e-70766ae8b56a",
    "countryIsoCode": "US",
    "firstName": "Paul",
    "lastName": "Smith",
    "companyName": "Example",
    "addressLine1": "451 Clarkson Ave",
    "addressLine2": "Brooklyn",
    "city": "New York",
    "postcode": "11203",
    "stateCode": "NY",
    "email": "apisupport@gelato.com",
    "phone": "123456789"
}

Query Parameters

Parameter Type Description
orderReferenceId (required) string Reference to your internal order id.

Response Parameters

Response data represented by RecipientObject. This is the same object as in Quote API request.

Parameter Type Description
countryIsoCode (required) string The two-character ISO 3166-1 code that identifies the country or region. Please note: the country code for United Kingdom is GB and not UK as used in the top-level domain names for that country.
Pattern: ^[A-Z]{2}$
firstName (required) string The first name of the recipient at this address.
Maximum length is 25 characters
lastName (required) string The last name of the recipient at this address.
Maximum length is 25 characters
companyName (optional) string The company name of the recipient at this address.
Maximum length is 60 characters
addressLine1 (required) string The first line of the address. For example, number, street, and so on.
Maximum length is 35 characters
addressLine2 (optional) string The second line of the address. For example, suite or apartment number.
Maximum length is 35 characters
city (required) string The city name.
Maximum length is 30 characters
postcode (required) string The postal code, which is the zip code or equivalent. Typically required for countries with a postal code or an equivalent. See postal code.
Maximum length is 15 characters
stateCode (optional) string The code for a US state or the equivalent for other countries. Required for requests if the address is in one of these countries: Brazil, India, Chile, Australia, United Kingdom or United States. In case of United Kingdom country, the state code means county.
Maximum length is 35 characters
email (required) string The email address for the recipient.
Pattern: .+@["-].+$
phone (optional) string The phone number, in E.123 format.
Maximum length is 25 characters
isBusiness (optional) bool Boolean value, declares the recipient being a business. Use if tax for recipient country is different for private and business customers (e.g. in Brazil) to change federalTaxId field type. Mandatory for Brazil if recipient is a company.
federalTaxId (optional) string The Federal Tax identification number of recipient. Use to provide CPF/CNPJ of a Brazilian recipient. Mandatory for Brazil. In order to supply CNPJ instead of CPF, set isBusiness field to true.
stateTaxId (optional) string The State Tax identification number of recipient. Use to provide IE of a Brazilian recipient. Mandatory for Brazil if recipient is a company. In order to supply this field, set isBusiness field to true.
registrationStateCode (optional) string The code number for a US state or the equivalent for other countries that defines state where recipient company is registered. Mandatory for Brazil if recipient is a company. In order to supply this field, set isBusiness field to true.

Response Messages

Error response example:

{
  "message": "Order not found."
}
HTTP Status Code Message
404 Order not found.