curl -sS -X POST 'https://apipub.firstbasehq.com/api/v1/orders/{orderId}/decline' \
-H 'Authorization: ApiKey YOUR_API_KEY' \
-H 'Accept: application/json'import requests
url = "https://apipub.firstbasehq.com/api/v1/orders/{orderId}/decline"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://apipub.firstbasehq.com/api/v1/orders/{orderId}/decline', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "123E4567-E89B-12D3-A456-426614174000",
"status": "COMPLETED",
"orderItems": [
{
"id": "123E4567-E89B-12D3-A456-426614174000",
"skuId": "123E4567-E89B-12D3-A456-426614174000",
"title": "iPad Air - Silver, 64GB, WiFi",
"categoryCode": "COMPUTER",
"status": "PROCESSING",
"statusHistory": [
{
"status": "APPROVED",
"timestamp": "2023-01-01T12:00:00Z"
}
],
"shipment": {
"trackingUrl": "<string>",
"trackingCode": "1Z00000000",
"carrier": "UPS",
"status": "DELIVERED",
"trackingHistory": [
{
"status": "IN_TRANSIT",
"timestamp": "2023-11-07T05:31:56Z"
}
]
},
"fulfillmentMethod": "WAREHOUSE",
"vendorSku": "APL-MK183LL/A",
"vendorCode": "APPLE",
"serialNumber": "C02XL0AAJG5L",
"justification": "Need higher RAM for local development workflows",
"purchaseOrderNumber": "PO-US-LAPTOPS-001",
"type": "PHYSICAL",
"intendedFulfillmentMethod": "WAREHOUSE",
"orderedPricing": {
"id": "123E4567-E89B-12D3-A456-426614174000",
"unitPrice": 999,
"currencyCode": "USD"
},
"discountedPrice": 899,
"orderedWarrantyItem": "<unknown>",
"firstbaseManaged": true
}
],
"statusHistory": [
{
"status": "APPROVED",
"timestamp": "2023-01-01T12:00:00Z"
}
],
"orderType": "ONE_OFF",
"personId": "d7d0d906-425f-402f-bde1-39031c67c40b",
"officeId": "d7d0d906-425f-402f-bde1-39031c67c40b",
"shippingAddress": {
"countryCode": "US",
"addressLine1": 123,
"addressLine2": "Suite 103",
"administrativeArea": "NY",
"locality": "New York City",
"postalCode": 10123
},
"submittedBy": "John S. (Firstbase)",
"approvedBy": "Jane Smith",
"approvedAt": "2026-02-26",
"deliverToOffice": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "NYC HQ",
"address": {
"countryCode": "US",
"addressLine1": 123,
"addressLine2": "Suite 103",
"administrativeArea": "NY",
"locality": "New York City",
"postalCode": 10123
}
},
"deliverToPerson": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"firstName": "Jane",
"lastName": "Smith",
"email": "jane.smith@example.com"
},
"createdAt": "2026-02-26T14:15:22.123Z",
"updatedAt": "2026-03-15T09:00:00.000Z",
"expectedBy": "2026-03-10",
"packageSlug": "engineering-onboarding",
"deliveryLocation": "PERSON"
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}Decline an order awaiting approval
Rejects an order that is awaiting approval. Transitions AWAITING_APPROVAL → DECLINED. All non-cancelled order items are also set to DECLINED. Sends a decline notification email for person orders.
Not for cancelling ORDERED or APPROVED orders. To cancel an active order, use PATCH /api/v1/orders/ with {"status": "CANCELLED"} instead.
curl -sS -X POST 'https://apipub.firstbasehq.com/api/v1/orders/{orderId}/decline' \
-H 'Authorization: ApiKey YOUR_API_KEY' \
-H 'Accept: application/json'import requests
url = "https://apipub.firstbasehq.com/api/v1/orders/{orderId}/decline"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://apipub.firstbasehq.com/api/v1/orders/{orderId}/decline', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "123E4567-E89B-12D3-A456-426614174000",
"status": "COMPLETED",
"orderItems": [
{
"id": "123E4567-E89B-12D3-A456-426614174000",
"skuId": "123E4567-E89B-12D3-A456-426614174000",
"title": "iPad Air - Silver, 64GB, WiFi",
"categoryCode": "COMPUTER",
"status": "PROCESSING",
"statusHistory": [
{
"status": "APPROVED",
"timestamp": "2023-01-01T12:00:00Z"
}
],
"shipment": {
"trackingUrl": "<string>",
"trackingCode": "1Z00000000",
"carrier": "UPS",
"status": "DELIVERED",
"trackingHistory": [
{
"status": "IN_TRANSIT",
"timestamp": "2023-11-07T05:31:56Z"
}
]
},
"fulfillmentMethod": "WAREHOUSE",
"vendorSku": "APL-MK183LL/A",
"vendorCode": "APPLE",
"serialNumber": "C02XL0AAJG5L",
"justification": "Need higher RAM for local development workflows",
"purchaseOrderNumber": "PO-US-LAPTOPS-001",
"type": "PHYSICAL",
"intendedFulfillmentMethod": "WAREHOUSE",
"orderedPricing": {
"id": "123E4567-E89B-12D3-A456-426614174000",
"unitPrice": 999,
"currencyCode": "USD"
},
"discountedPrice": 899,
"orderedWarrantyItem": "<unknown>",
"firstbaseManaged": true
}
],
"statusHistory": [
{
"status": "APPROVED",
"timestamp": "2023-01-01T12:00:00Z"
}
],
"orderType": "ONE_OFF",
"personId": "d7d0d906-425f-402f-bde1-39031c67c40b",
"officeId": "d7d0d906-425f-402f-bde1-39031c67c40b",
"shippingAddress": {
"countryCode": "US",
"addressLine1": 123,
"addressLine2": "Suite 103",
"administrativeArea": "NY",
"locality": "New York City",
"postalCode": 10123
},
"submittedBy": "John S. (Firstbase)",
"approvedBy": "Jane Smith",
"approvedAt": "2026-02-26",
"deliverToOffice": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "NYC HQ",
"address": {
"countryCode": "US",
"addressLine1": 123,
"addressLine2": "Suite 103",
"administrativeArea": "NY",
"locality": "New York City",
"postalCode": 10123
}
},
"deliverToPerson": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"firstName": "Jane",
"lastName": "Smith",
"email": "jane.smith@example.com"
},
"createdAt": "2026-02-26T14:15:22.123Z",
"updatedAt": "2026-03-15T09:00:00.000Z",
"expectedBy": "2026-03-10",
"packageSlug": "engineering-onboarding",
"deliveryLocation": "PERSON"
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}Authorizations
Prefix the value with "ApiKey" to indicate the custom authorization type
Path Parameters
Response
Order declined successfully
Order's ID
"123E4567-E89B-12D3-A456-426614174000"
Order's status
AWAITING_APPROVAL, ORDERED, PROCESSING, ORDERED_NOT_SHIPPED, SHIPPED, COMPLETED, PARTIALLY_SHIPPED, DECLINED, AWAITING_DELIVERY_SCHEDULING, DELIVERY_SCHEDULED, DELIVERED, ACTIVATED, NONE, APPROVED, AWAITING_FULFILLMENT, ACTION_REQUIRED, PENDING, RETURN_KIT_SENT, RETURN_KIT_DELIVERED, RETURN_KIT_SENT_BACK, RECEIVED_IN_WAREHOUSE, RETURNED, NOT_RETURNED, OUT_FOR_DELIVERY, DELIVERY_EXCEPTION, SUBMITTED, CANCELLED, CONFIRMED, NOT_COMPLETED, PARTIALLY_COMPLETED "COMPLETED"
All order item rows on the order, including lines in terminal states such as CANCELLED. Replacing products via PATCH cancels superseded rows rather than deleting them, so consumers should filter by each item's status when they care only about active lines.
Show child attributes
Show child attributes
Chronological history of status changes
Show child attributes
Show child attributes
Type of order based on lifecycle context
ONE_OFF, ONBOARDING, REPLACEMENT The ID of the Person
"d7d0d906-425f-402f-bde1-39031c67c40b"
The ID of the Office
"d7d0d906-425f-402f-bde1-39031c67c40b"
Order item's shipping address
Show child attributes
Show child attributes
Name of the person who submitted the order
"John S. (Firstbase)"
Name of the person who approved the order
"Jane Smith"
Date when the order was approved
"2026-02-26"
Office to which the order is delivered, when different from the assigned office
Show child attributes
Show child attributes
Person to whom the order is delivered, when different from the assigned person
Show child attributes
Show child attributes
UTC ISO-8601 timestamp when the order was created.
"2026-02-26T14:15:22.123Z"
UTC ISO-8601 timestamp when the order was last updated.
"2026-03-15T09:00:00.000Z"
Date by which the order is expected to be delivered (calendar date, no time component).
"2026-03-10"
Slug of the product package this order was created from, if any.
"engineering-onboarding"
The order's delivery location type (mirrors the FE Orders 'Delivery location' column, where PERSON is shown as 'Employee'). Derived from deliverToOffice / deliverToPerson: OFFICE when deliverToOffice is set, otherwise PERSON when deliverToPerson is set.
PERSON, OFFICE