Skip to content

Instantly share code, notes, and snippets.

@denimamab
Last active Dec 30, 2021
Embed
What would you like to do?

Orders API

Endpoints

POST : /api/orders

  • Response Types:
    • 200: Order created successfully
    • 400: Invalid order data

Request Body:

{
  "order": {
    "client_email_id": "string",
    "country": "AT",
    "total_shipping_price": 0,
    "total_price_excluding_vat": 0,
    "total_price_including_vat": 0,
    "vat": 0,
    "total_discount": 0,
    "payment_type": "wire",
    "shipping_address_line": "string",
    "shipping_country": "string",
    "shipping_state": "string",
    "shipping_city": "string",
    "shipping_zip_code": "string",
    "billing_address_line": "string",
    "billing_country": "string",
    "billing_state": "string",
    "billing_city": "string",
    "billing_zip_code": "string"
  },
  "details": [
    {
      "engine_code": "string",
      "engine_feature": "Moteur Nu",
      "engine_code_note": "string",
      "encrypted_supplier_name": "string",
      "internal_engine_ref": "string",
      "warehouse": "B",
      "manufacturer": "string",
      "price_excluding_vat": 0,
      "price_including_vat": 0,
      "vat": 0,
      "quantity": 0,
      "shipping_type": "standard",
      "shipping_price": 0,
      "shipping_number": "string",
      "discount": 0
    }
  ]
}

Response Body:

{
  "errors": [
    {
      "key": "string",
      "code": "string"
    }
  ],
  "data": {
    "orderId": "string|number"
  }
}

PATCH: /api/orders/{orderId}

  • Response Types:
    • 200: Order patched successfully
    • 400: Invalid order data
    • 404: Order not found

Request body:

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