---
updatedAt: 2025-05-19T20:27:53.000Z
agentTools:
  projectIndex: https://hk-docs.gogox.com/llms.txt
---

# Place a Delivery order

This API will place an order on our platform.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "GOGOX Public API v2 (HK STAG)",
    "version": "0.1.0",
    "description": "# Introduction\nThis is v2 of GOGOX public APIs. GOGOX platform is where you can ease your logistics needs through our huge network of delivery partners. You can reduce your logistics operation and leverage the capabilities of GOGOX Platform through our APIs. You can contact our sales [on our website]() and start trying.\n# Authentication  \nYour security is our number 1 priority. You can follow [OAuth 2.0 client credential flow](https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/). In short, once you have registered, you should receive a **client ID** and a **client secret**. Once you have those, you can get an **access token** from `POST /oauth/token` with **client ID** and **client secret**. You can access the remaining APIs using the access token. The access token will expire according to the API responses. If it is expired, simply call `POST /oauth/token` again to refresh the token.\n# Versioning\nThe stablility of our APIs is also one of our top priority. You can integrate with our APIs and put in minimal maintenence cost to keep it working. Each developer account will have the latest version of our APIs as your API version. We won't change it without your consent. \nIn case you want to upgrade to a certain version to enjoy the latest enhancement, please access developer portals to change it. You will receive our changes in each releases in your registered email. You can also temporarily override and try out other version of API with specifying `Api-Version` key in the HTTP header in each API call.\n# Callback\nOnce you have placed the orders, it is very important for you to be able to receive updates of your placed orders from our platform. We are using webhook to notify your software the updates of your placed orders. You can set up your callback URLs in the developer portal.\nAs always a stable API is very important for your business, so in case we cannot send you the webhook notification, we are doing an exponential backoff up to 10 times.\nYou can also poll the `GET /api/v2/orders/{uuid}` to get the latest status of the order request. \n# Time\nWe are using utc timestamp.\n# OAuth Scope\nWe currently open all privileges for API access. The scope is always your dataset.\n# Release Notes\n2020-04-01: [0.1.0]()"
  },
  "servers": [
    {
      "url": "https://{server}",
      "description": "Our Sandbox Server for different regions",
      "variables": {
        "server": {
          "default": "stag-hk-api.gogox.com"
        }
      }
    }
  ],
  "paths": {
    "/delivery/orders": {
      "post": {
        "summary": "Place a Delivery order",
        "description": "This API will place an order on our platform.",
        "tags": [
          "Delivery Orders"
        ],
        "security": [
          {
            "OAuth2": [
              "all"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryCreateOrderRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Order has been successfully created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryOrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Some other errors from input, JSON parsing / something else",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/400ResponseOfDelivery"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "422": {
            "description": "Some input validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InputValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests"
          },
          "5XX": {
            "description": "Unknown server error."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "OAuth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "/oauth/token",
            "scopes": {
              "all": "User can access all URL"
            }
          }
        }
      }
    },
    "schemas": {
      "400ResponseOfDelivery": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "unprocessable_entity",
              "invalid_params",
              "invalid_request_time",
              "prepaid_wallet_insufficient_balance",
              "hsbc_payme_requested_amount_mismatch",
              "bad_request",
              "location_out_of_range"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "Invalid location params",
              "Bad request",
              "Request time must be after {valid_pickup_time}",
              "invalid_payment_type",
              "Commons::FailureConstant::PrepaidWalletInsufficientBalance",
              "Commons::FailureConstant::LocationNotInService",
              "service_not_available(current delivery_type is not available)"
            ]
          }
        }
      },
      "Timestamp": {
        "type": "integer",
        "description": "UTC Timestamp in second(e.g. 1622696400)"
      },
      "PaymentMethod": {
        "type": "string",
        "description": "These are the supported payment methods for APIs.",
        "enum": [
          "prepaid_wallet",
          "monthly_settlement"
        ]
      },
      "DeliveryPriceBreakdownKey": {
        "type": "string",
        "description": "The available key for price_breakdown",
        "enum": [
          "base_charge",
          "speed_surcharge",
          "night_surcharge",
          "custom_surcharge",
          "custom_surcharge_subsidy",
          "help_buy"
        ]
      },
      "Courier": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "phone_number": {
            "type": "string"
          },
          "location": {
            "type": "object",
            "properties": {
              "lat": {
                "type": "number"
              },
              "lng": {
                "type": "number"
              },
              "location_updated_at": {
                "type": "integer"
              }
            }
          }
        }
      },
      "DeliveryContact": {
        "required": [
          "name",
          "phone_number"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "phone_number": {
            "type": "string"
          }
        }
      },
      "DeliveryOrderStatus": {
        "type": "string",
        "enum": [
          "pending",
          "active",
          "completed",
          "cancelled"
        ]
      },
      "DeliveryPriceBreakdownItem": {
        "type": "object",
        "required": [
          "key",
          "amount"
        ],
        "properties": {
          "key": {
            "$ref": "#/components/schemas/DeliveryPriceBreakdownKey"
          },
          "amount": {
            "type": "integer"
          }
        }
      },
      "DeliveryType": {
        "type": "string",
        "enum": [
          "instant",
          "same_day_day",
          "same_day_night",
          "speed"
        ]
      },
      "LatLng": {
        "type": "object",
        "required": [
          "lat",
          "lng"
        ],
        "properties": {
          "lat": {
            "type": "number"
          },
          "lng": {
            "type": "number"
          }
        }
      },
      "Package": {
        "required": [
          "content",
          "weight",
          "height",
          "length",
          "width"
        ],
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          },
          "weight": {
            "description": "in kg",
            "type": "number",
            "enum": [
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              19,
              20
            ]
          },
          "height": {
            "description": "in cm",
            "type": "number"
          },
          "length": {
            "description": "in cm",
            "type": "number"
          },
          "width": {
            "description": "in cm",
            "type": "number"
          }
        }
      },
      "DeliveryCreateOrderRequest": {
        "type": "object",
        "required": [
          "delivery_type",
          "package",
          "pickup",
          "destinations",
          "payment_method"
        ],
        "properties": {
          "delivery_type": {
            "$ref": "#/components/schemas/DeliveryType"
          },
          "payment_method": {
            "$ref": "#/components/schemas/PaymentMethod"
          },
          "package": {
            "$ref": "#/components/schemas/Package"
          },
          "pickup": {
            "type": "object",
            "required": [
              "location",
              "contact",
              "street_address",
              "floor_or_unit_number"
            ],
            "properties": {
              "schedule_at": {
                "$ref": "#/components/schemas/Timestamp"
              },
              "street_address": {
                "type": "string"
              },
              "floor_or_unit_number": {
                "type": "string"
              },
              "location": {
                "$ref": "#/components/schemas/LatLng"
              },
              "contact": {
                "$ref": "#/components/schemas/DeliveryContact"
              }
            }
          },
          "destinations": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "location",
                "street_address",
                "floor_or_unit_number",
                "contact"
              ],
              "properties": {
                "street_address": {
                  "type": "string"
                },
                "floor_or_unit_number": {
                  "type": "string"
                },
                "location": {
                  "$ref": "#/components/schemas/LatLng"
                },
                "contact": {
                  "$ref": "#/components/schemas/DeliveryContact"
                }
              }
            }
          },
          "merchant_order_number": {
            "description": "optional",
            "type": "string"
          },
          "note_to_courier": {
            "description": "optional",
            "type": "string"
          },
          "send_webhook_on_created": {
            "type": "boolean"
          },
          "webhook_extra_data": {
            "type": "string"
          }
        }
      },
      "DeliveryOrderResponse": {
        "type": "object",
        "properties": {
          "delivery_type": {
            "$ref": "#/components/schemas/DeliveryType"
          },
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "payment_method": {
            "$ref": "#/components/schemas/PaymentMethod"
          },
          "courier": {
            "$ref": "#/components/schemas/Courier"
          },
          "status": {
            "$ref": "#/components/schemas/DeliveryOrderStatus"
          },
          "price": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "format": "currency"
              },
              "amount": {
                "type": "integer"
              },
              "tip": {
                "type": "integer"
              }
            }
          },
          "price_breakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeliveryPriceBreakdownItem"
            }
          },
          "merchant_order_number": {
            "type": "string"
          },
          "note_to_courier": {
            "type": "string"
          },
          "package": {
            "$ref": "#/components/schemas/Package"
          },
          "pickup": {
            "type": "object",
            "required": [
              "status",
              "schedule_at",
              "street_address",
              "floor_or_unit_number",
              "location",
              "contact"
            ],
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "not_picked_up",
                  "completed_pick_up"
                ]
              },
              "schedule_at": {
                "$ref": "#/components/schemas/Timestamp"
              },
              "street_address": {
                "type": "string"
              },
              "floor_or_unit_number": {
                "type": "string"
              },
              "location": {
                "$ref": "#/components/schemas/LatLng"
              },
              "contact": {
                "$ref": "#/components/schemas/DeliveryContact"
              }
            }
          },
          "destinations": {
            "type": "array",
            "items": {
              "required": [
                "street_address",
                "location",
                "contact"
              ],
              "properties": {
                "status": {
                  "type": "string",
                  "enum": [
                    "not_delivered",
                    "delivered"
                  ]
                },
                "estimated_dropoff_at": {
                  "type": "integer"
                },
                "street_address": {
                  "type": "string"
                },
                "floor_or_unit_number": {
                  "type": "string"
                },
                "location": {
                  "$ref": "#/components/schemas/LatLng"
                },
                "contact": {
                  "$ref": "#/components/schemas/DeliveryContact"
                },
                "signature_image_url": {
                  "type": "string"
                }
              }
            }
          },
          "tracking_id": {
            "description": "tracking ID",
            "type": "string"
          },
          "tracking_url": {
            "description": "tracking URL",
            "type": "string"
          },
          "pickup_code": {
            "type": "string"
          },
          "pickup_qr_code_image": {
            "type": "string"
          },
          "drop_off_code": {
            "type": "string",
            "example": 0
          },
          "need_drop_off_code_verification": {
            "type": "boolean"
          }
        }
      },
      "InputValidationError": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```