Order Completed API

The order-completed end point accepts the final details of the shopper’s order, screens the order details for denied parties, and returns the results along with an iGlobal specific order Id.

Service End Point – order-completed

HTTPS Request

HTTP Method POST
End Point URL https://api.iglobalstores.com/2.0/order-completed
Protocol HTTPS
Message Format JSON
Accept HTTP Header Accept: application/json
Security Token HTTP Header serviceToken: your-test-token-value
  Add a header to your HTTPS request named serviceToken with a value of your Test Security API Token. (Contact your Account Manager for this token)
Content-Type HTTP Header Content-Type: application/json
  Because you will be posting JSON data to the service, add a header to your HTTPS request named Content-Type with a value of application/json

Request Parameters

Message Format JSON

Example request

{
    "shippingQuoteId": "bcdbdbcd-0145-4d3b-a54e-0de3cdce5a0a",
    "shipToName": "John Doe",
    "shipToCompany": null,
    "shipToPhone": "+1 555-555-5555",
    "shipToEmail": "jdoe@jdoe.com",
    "billingName": "John E. Doe",
    "billingCompany": null,
    "billingPhone": "+1 555-555-5555",
    "billingEmail": "jdoe@jdoe.com",
    "billingAddress": {
        "address1": "123 S West Elm St",
        "address2": null,
        "address3": null,
        "city": "Calgary",
        "state": "Alberta",
        "stateCode": null,
        "postalCode": "T2P 5G8",
        "countryCode": "CA"
    },
    "prepaidDutyTax": true,
    "paymentTypeCode": "PAYPAL",
    "orderGrandTotal": 1225.89,
    "orderNumber": "854725421"
}

Request JSON Definitions

shippingQuoteId

Required

This is the id of the shipping quote the shopper chose.

The cart details need to be the same as they were when the shipping quotes were retrieved. If the cart details have changed, then you should have called for new shipping quotes before completing the shopper’s order.

shipToName

Required

This is the complete name of the individual who will receive the shipped order.

shipToCompany

Not Required

This is the company name of the individual who will receive the shipped order.

shipToPhone

Required

This is the phone number of the individual who will receive the shipped order.

shipToEmail

Required

This is the email address of the individual who will receive the shipped order.

billingName

Required

This is the complete billing name of the order.

billingCompany

Not Required

This is the billing company name of the order.

billingPhone

Required

This is the billing phone number of the order.

billingEmail

Required

This is the billing email address of the order.

billingAddress

Required

This is the billing address of the order.

This is a map containing the following address fields: address1, address2, address3, city, state, stateCode, postalCode, countryCode. These contained fields are required or not, based on the country. The localization end point returns which specific address fields are required, or not, for each country. Note: stateCode is always not required, and not declared in the localization end point. You may pass stateCode if available.

prepaidDutyTax

Required

Example values true or false

Did the shopper elect to prepay their import duties and taxes, or were they forced to prepay them? If so, set to true. If not, set to false.

paymentTypeCode

Required

Example values “PAYPAL” or “VISA” or “MC” or “AMEX” or “DISC”

The payment method used by the shopper to pay for their order.

items[index].orderGrandTotal

Required

Example value 2102.99

This is the grand total paid by the shopper for their order, in USD (US Dollars). Please provide without commas, without a dollar sign “$”, and with two decimal places.

items[index].orderNumber

Required

Example value “854725421”

This is your order number for the newly completed order.

HTTPS Response

Message Format: JSON

Example response for only Canada & Australia; actual resposes will contain all supported countries.

{
    "igOrderId": "e55a4efc-e615-49af-b3a4-afcda87e9e5e",
    "deniedParty": {
        "flagged": true,
        "source": "source reference for review"
    }
}

Response JSON Definitions

igOrderId

Example value: “e55a4efc-e615-49af-b3a4-afcda87e9e5e”

Zonos identifier for the newly completed order.

deniedParty

This is a map of the denied party screening results. If set to null then the denied party screening wasn’t performed – contact your Account Manager if you encounter this.

deniedParty.flagged

Example values: true or false

Whether or not this order has matched a record in the Zonos denied party consolidated lists. If true, review this order before processing. When in doubt, don’t process an order that is flagged true.

deniedParty.source

If the flagged field was set to true, this field will hold source references useful in reviewing why the order was flagged as matching a denied party.