Hang Orders API

The Orders API from Hang — 1 operation(s) for orders.

Operations 1

POST /v2/external/orders Create an Order record #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/hang:hang-orders-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

hang-orders-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Hang Partner API (params in:formData) Orders API
  description: 'The Partner API allows you to request various resources that can power your loyalty program.


    © Hang 2023'
  version: '1.0'
  x-copyright: '&copy Hang 2023'
servers:
- url: /partner-api
security:
- ApiKeyAuth: []
tags:
- name: Orders
paths:
  /v2/external/orders:
    post:
      tags:
      - Orders
      operationId: post_v2_external_orders
      summary: Create an Order record
      responses:
        '200':
          description: ok
      description: 'This endpoint receives orders from external systems. It requires a comprehensive payload that includes details about the order,

        such as the items purchased, applicable taxes, discounts, and the source and POS system of the order. It can optionally link the order

        to a program membership if the program_membership_id is provided.'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                payload[order][line_items]:
                  type: array
                  items:
                    type: string
                  description: Line items in the order
                payload[order][amount]:
                  type: number
                  description: Total amount of the order in cents
                payload[order_source]:
                  type: string
                  description: Source of the order.
                payload[type]:
                  type: string
                  enum:
                  - payment.created
                  - payment.updated
                  - refund.created
                  - refund.updated
                  description: What type of transaction occurred.
                payload[merchant_pos_system]:
                  type: string
                  description: Type of POS system from which the order originates.
                payload[external_order_guid]:
                  type: string
                  description: Unique identifier for the order from the external system.
                payload[external_location_type]:
                  type: string
                  description: Type of the external location (e.g., ToastRestaurant).
                payload[external_location_id]:
                  type: string
                  description: Unique identifier for the location from the external system (e.g., a restaurant ID from Toast).
                payload[program_membership_id]:
                  type: string
                  description: Program membership ID if available. Nullable field to tie the order to a specific membership.
                payload[external_customer_id]:
                  type: string
                  description: External customer ID associated with the order.
                payload[order][applied_discounts]:
                  type: array
                  items:
                    type: string
                  description: List of reward IDs applied to the transaction as a whole
              required:
              - payload[order][line_items]
              - payload[order][amount]
              - payload[order_source]
              - payload[type]
              - payload[merchant_pos_system]
              - payload[external_order_guid]
              - payload[external_location_type]
              - payload[external_location_id]
          multipart/form-data:
            schema:
              type: object
              properties:
                payload[order][line_items]:
                  type: array
                  items:
                    type: string
                  description: Line items in the order
                payload[order][amount]:
                  type: number
                  description: Total amount of the order in cents
                payload[order_source]:
                  type: string
                  description: Source of the order.
                payload[type]:
                  type: string
                  enum:
                  - payment.created
                  - payment.updated
                  - refund.created
                  - refund.updated
                  description: What type of transaction occurred.
                payload[merchant_pos_system]:
                  type: string
                  description: Type of POS system from which the order originates.
                payload[external_order_guid]:
                  type: string
                  description: Unique identifier for the order from the external system.
                payload[external_location_type]:
                  type: string
                  description: Type of the external location (e.g., ToastRestaurant).
                payload[external_location_id]:
                  type: string
                  description: Unique identifier for the location from the external system (e.g., a restaurant ID from Toast).
                payload[program_membership_id]:
                  type: string
                  description: Program membership ID if available. Nullable field to tie the order to a specific membership.
                payload[external_customer_id]:
                  type: string
                  description: External customer ID associated with the order.
                payload[order][applied_discounts]:
                  type: array
                  items:
                    type: string
                  description: List of reward IDs applied to the transaction as a whole
              required:
              - payload[order][line_items]
              - payload[order][amount]
              - payload[order_source]
              - payload[type]
              - payload[merchant_pos_system]
              - payload[external_order_guid]
              - payload[external_location_type]
              - payload[external_location_id]
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
x-provenance:
  method: harvested
  publisher: Hang
  source: https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDjUJ7LXq2gMv9rmEsrI%2Fimports%2F9Jq6a7ptZ1zZpcbGXBNq%2Fschema_swagger_form_data.json?alt=media&token=f20a8d6c-a561-4ac2-8ede-0d9b6f694b19
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)