Skip to content

Instantly share code, notes, and snippets.

@squamuglia
Last active November 7, 2022 22:22
Show Gist options
  • Save squamuglia/d4b342600496e2b3a52b4bb70a68cee6 to your computer and use it in GitHub Desktop.
Save squamuglia/d4b342600496e2b3a52b4bb70a68cee6 to your computer and use it in GitHub Desktop.
External API Documentation

External API

Order JSON schema
{
  createdAt: DateTime, // ISO 8601
  orderId: string,
  lineItems: [
    {
      sku: string,
      name: string, // Product variant name
      quantity: number,
      // Price before discount applied
      price: {
        amount: number, // In cents $20.00 = 2000
        currencyCode: string, // ISO 4217 codes
      },
      // 0 if no discount applied
      discountAmount: {
        amount: number, // In cents $20.00 = 2000
        currencyCode: string, // ISO 4217 codes
      },
      // Same as price if no discount applied
      priceAfterDiscount: {
        amount: number, // In cents $20.00 = 2000
        currencyCode: string, // ISO 4217 codes
      },
    },
  ],
  // Subtotal order price including discounts, excluding shipping, taxes and duties
  subtotalPrice: {
    amount: number, // In cents $20.00 = 2000
    currencyCode: string,
  },
  firstName: string,
  lastName: string,
  email: string,
  address1: string,
  address2: string,
  city: string,
  zip: string,
  state: string,
  country: string,
  phone: string,
  countryCode: string,
};

Tracking number JSON Schema

{
    orderId: string,
    trackingNumber: string,
    returnTrackingNumber: string
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment