PUT
/
orders
/
{id}
curl --request PUT \
  --url https://sandbox-api.billingrails.com/v1/orders/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "account_id": "<string>",
  "currency": "<string>",
  "use_billing_address_for_shipping": true,
  "billing_address": {
    "line1": "<string>",
    "line2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "region": "<string>",
    "postal_code": "<string>",
    "country": "<string>"
  },
  "shipping_address": {
    "line1": "<string>",
    "line2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "region": "<string>",
    "postal_code": "<string>",
    "country": "<string>"
  },
  "line_items": [
    {
      "product_id": "<string>",
      "quantity": 2,
      "unit_amount": 1,
      "description": "<string>"
    }
  ],
  "metadata": {}
}'
{
  "order": {
    "object": "order",
    "id": "ord_IhMUl3rrZ3",
    "created_at": "2025-02-14T17:33:40.843Z",
    "number": "ORD-001",
    "status": "confirmed",
    "payment_status": "paid",
    "fulfillment_status": "pending",
    "return_status": "none",
    "currency": "NGN",
    "subtotal_amount": 5000,
    "total_amount": 5000,
    "paid_amount": 5000,
    "outstanding_amount": 0,
    "account_id": "acc_IhMUl3rrZ3",
    "line_items": [
      {
        "object": "order_line_item",
        "id": "oli_IhMUl3rrZ3",
        "product_name": "Premium Plan",
        "product_variant_name": null,
        "description": "Premium subscription plan",
        "quantity": 1,
        "unit_amount": 5000,
        "subtotal_amount": 5000,
        "total_amount": 5000,
        "product_id": "prod_IhMUl3rrZ3",
        "product_variant_id": "pv_IhMUl3rrZ3"
      }
    ],
    "metadata": null
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/json

Order payload

The body is of type object.

Response

200 - application/json

Order updated

The response is of type object.