Create an order for delivering kits to a client, which will be created with a status of 'pending'.The order will be created with the user making the request as the 'placed_by' user.

post/api/v2/orders/

Request

  • Base URL: https://app.spotdx.com
  • URL: https://app.spotdx.com/api/v2/orders/
  • Auth: API key in header Authorization

Request body

kit_typesstring[] required

A list of all the kit types to place in the order.

metadataobject nullable

An optional dictionary of key-value pairs stored with the order.

Example request

{
  "kit_types": [
    "health_kit_1"
  ],
  "recipient": {
    "first_name": "Alice",
    "last_name": "Smith",
    "email": "alice123@gmail.com",
    "phone": "1234567890",
    "address": {
      "street1": "123 Main St",
      "street2": "Apt 1",
      "city": "San Francisco",
      "state": "CA",
      "country": "US",
      "zip": "94105"
    }
  },
  "metadata": {
    "some_key": "some_value"
  }
}

Response

order_idstring

The unique identifier of the order.

createdstring date-time
status'pending' | 'in_progress' | 'completed' | 'canceled'
kit_typesstring[]

A list of the kit types that are included in this order.

metadataobject nullable

An optional dictionary of key-value pairs stored with the order.

Example response

{
  "order_id": "O1234567",
  "created": "2023-01-01T04:30:11.222Z",
  "recipient": {
    "first_name": "Alice",
    "last_name": "Smith",
    "email": "alice123@gmail.com",
    "phone": "1234567890",
    "address": {
      "street1": "123 Main St",
      "street2": "Apt 1",
      "city": "San Francisco",
      "state": "CA",
      "country": "US",
      "zip": "94105"
    }
  },
  "kit_types": [
    "health_kit_1"
  ],
  "kits": [],
  "metadata": {
    "some_key": "some_value"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.