# SIBI Developer Documentation > Build with the SIBI Platform and Research Agent APIs — clear guides, examples, and references. # Build with SIBI Source: https://docs.sibipro.com/ Use SIBI APIs to research compatible products, create orders, track fulfillment, and keep your systems in sync. Start with the product you are integrating, then follow its guided path to a first successful request. **[Platform APIs](/getting-started/authentication)** Authenticate once, then build ordering, catalog, and fulfillment integrations. **[Checkout Links](/getting-started/checkout-links)** Send customers to a preconfigured SIBI checkout from anywhere on the web. **[Events](/events/receive-events)** Receive lifecycle updates for orders, invoices, assets, offers, and projects. ## Explore the platform **[GraphQL API](/graphql/making-a-graphql-request)** Order products, review pricing, and query invoices over GraphQL. **[REST API](/rest/making-a-rest-request)** Manage offers, look up products, and cancel orders over REST. ## Send us feedback Questions, error reports, and feature requests reach the Sibi team through [`POST /feedback`](/api-reference/feedback/guide). --- # Assets API Source: https://docs.sibipro.com/api-reference/assets RESTful API for the assets installed at the properties Sibi manages for you: what the product is, where it lives, and what its warranty covers. Reads are scoped to what the authenticated caller is authorized to see. Version 1.0.0 Base URL: `https://api.sibipro.com/assets` ## Exports Export every asset the caller can see into one file. Start an export, poll it until it succeeds, then download the file. - [`POST /exports`](/api-reference/assets/exports/create-export) — Create export. - [`GET /exports/{id}`](/api-reference/assets/exports/get-export) — Get export. ## Operations - [`GET /`](/api-reference/assets/operations/list-assets) — List assets. - [`GET /{id}`](/api-reference/assets/operations/get-asset) — Get asset. --- # Create export Source: https://docs.sibipro.com/api-reference/assets/exports/create-export Starts an export of every asset the caller can see into one gzipped JSON Lines file, one asset per line in the same shape `GET /assets/{id}` serves. The export runs in the background: this responds `202` with the export in `in_progress` status and a `Location` header for it. Poll `GET /assets/exports/{id}` until the status is `succeeded`, then fetch `download.url`. Only one export can be in progress per organization at a time; a second request while one is `in_progress` responds `409` naming the running export. No request body. `POST /exports` **Responses** - `202` — The export has been queued - `401` — The Authorization header is missing, or the bearer token could not be resolved (invalid, expired, or revoked) - `403` — The token is missing the scope this operation requires (INSUFFICIENT\_SCOPE), is a GraphQL token rather than a REST API token (REST\_TOKEN\_REQUIRED), or it was minted for the other environment (TOKEN\_ENVIRONMENT\_MISMATCH) - `409` — An export is already in progress for the caller’s organization (EXPORT\_IN\_PROGRESS). Poll that export instead; a new one can be requested once it has succeeded or failed - `500` — Internal server error - `503` — The token-exchange service is unavailable or misconfigured — retry shortly. Not a token problem. Response example, 202: ```json { "id": "ae_aBcD1234", "status": "in_progress", "createdAt": "2019-08-24T14:15:22Z", "startedAt": "2019-08-24T14:15:22Z", "completedAt": "2019-08-24T14:15:22Z", "rowCount": 0, "fileSize": 0, "download": { "url": "http://example.com", "method": "GET", "expiresAt": "2019-08-24T14:15:22Z" }, "error": { "code": "EXPORT_GENERATION_FAILED", "message": "string" } } ``` --- # Get export Source: https://docs.sibipro.com/api-reference/assets/exports/get-export One export by its id, with its current status. While it is `succeeded`, the response carries `download`: a signed URL for the file that is valid for a short time — read the export again for a fresh one. Responds 404 when no export with that id exists. `GET /exports/{id}` **Responses** - `200` — The export - `400` — Invalid input parameters (VALIDATION\_ERROR) - `401` — The Authorization header is missing, or the bearer token could not be resolved (invalid, expired, or revoked) - `403` — The token is missing the scope this operation requires (INSUFFICIENT\_SCOPE), is a GraphQL token rather than a REST API token (REST\_TOKEN\_REQUIRED), or it was minted for the other environment (TOKEN\_ENVIRONMENT\_MISMATCH) - `404` — No export with this id exists - `500` — Internal server error - `503` — The token-exchange service is unavailable or misconfigured — retry shortly. Not a token problem. Response example, 200: ```json { "id": "ae_aBcD1234", "status": "in_progress", "createdAt": "2019-08-24T14:15:22Z", "startedAt": "2019-08-24T14:15:22Z", "completedAt": "2019-08-24T14:15:22Z", "rowCount": 0, "fileSize": 0, "download": { "url": "http://example.com", "method": "GET", "expiresAt": "2019-08-24T14:15:22Z" }, "error": { "code": "EXPORT_GENERATION_FAILED", "message": "string" } } ``` --- # Assets Guide Source: https://docs.sibipro.com/api-reference/assets/guide The Assets API returns the assets Sibi has on record for a property: what the product is, where it's installed, its dimensions, and its warranty coverage. ## Benefits - **Product identity:** SKU, manufacturer, category, and serial number for each installed asset - **Warranty visibility:** Time-sliced coverage windows so you can tell what's covered and when - **Address-scoped:** Narrow results to the assets installed at one property - **Single reads:** Fetch one asset by its id once you hold it - **Bulk export:** Request a file of all your assets, then download it ## Core Concepts **Asset** A single product installed at a property, with its identity, dimensions, and warranty coverage **Warranty Coverage** A time-sliced window during which a specific set of coverage types applies to an asset **Export** A background job that writes all your assets into one downloadable file ## Asset ids Every asset id this API returns carries the `as_` prefix, so an id is self-describing wherever it is logged or stored. `GET /assets/{id}` accepts the id either way: as returned here (`as_aBcD1234`) or bare (`aBcD1234`), which is the form GraphQL responses and version `1` [asset events](/events/assets#id) carry. ## Pagination Results are paged with an opaque cursor. Pass the previous response's `next` back as `after` to fetch the next page; `next` is `null` once a page comes back short. > **Warning** > > Calling without an `address` browses every asset the caller can see across all properties. This > is meant for one-off backfills, not realtime use, and can be slow at scale — supply `address` to > narrow to one property instead. ## Exports An export writes all your assets into one file, so you can load your whole portfolio without paging through `GET /assets`. It includes the assets in every office the token's user can access. Exports run in the background: you create one, poll it until it is ready, then download the file. 1. **Create the export** `POST /assets/exports` with a token that carries `create:asset-exports`. There is no request body. 2. **Poll until it is ready** `GET /assets/exports/{id}` with `read:asset-exports` until `status` is `succeeded` or `failed`. 3. **Download the file** Fetch `download.url`. The file is gzipped JSON Lines. ### Create the export ```shell Curl curl \ --request POST \ --header 'Authorization: Bearer ' \ https://api.sibipro.com/assets/exports ``` ```javascript Fetch const response = await fetch('https://api.sibipro.com/assets/exports', { method: 'POST', headers: { Authorization: `Bearer ${yourApiKey}` }, }); const exportJob = await response.json(); ``` A successful call returns `202 Accepted` with the export in `in_progress` status and a `Location` header pointing at it: ```json Response { "id": "ae_aBcD1234", "status": "in_progress", "createdAt": "2026-09-24T18:00:00.000Z" } ``` > **One export at a time** > > Only one export can be in progress per organization. A second `POST` while one is `in_progress` > returns `409` with code `EXPORT_IN_PROGRESS` and the running export's id in > `exportId`. Poll that export instead; once it has succeeded or failed, you can create a new one. ### Poll for the result ```shell Curl curl \ --header 'Authorization: Bearer ' \ https://api.sibipro.com/assets/exports/ae_aBcD1234 ``` An export stays `in_progress` until it moves to `succeeded` or `failed`. Poll every few seconds; a large portfolio can take several minutes. Once it has succeeded, the response carries the file's row count, size, and a download link: ```json Response { "id": "ae_aBcD1234", "status": "succeeded", "createdAt": "2026-09-24T18:00:00.000Z", "startedAt": "2026-09-24T18:00:02.000Z", "completedAt": "2026-09-24T18:03:40.000Z", "rowCount": 48210, "fileSize": 6291456, "download": { "url": "https://…", "method": "GET", "expiresAt": "2026-09-24T18:19:12.000Z" } } ``` A `failed` export carries an `error` with a `code` and `message` instead. A failed export could not be generated; create a new export to try again. ### Download the file `download.url` is a signed link to the file. The link is valid for 15 minutes from the time you read the export; read the export again to get a fresh one. ```shell Curl curl --output assets.jsonl.gz '' gunzip assets.jsonl.gz ``` The file is gzipped [JSON Lines](https://jsonlines.org/): one asset per line, in exactly the shape `GET /assets/{id}` returns, so a single parser handles both. The file is a snapshot of your assets as of the export's `createdAt`. A succeeded export keeps its download link, so you can fetch the file again later; create a new export when you want current data. ## Test environment Send requests to `https://dev.sibi.pro/assets` with a test REST API token to work with test assets. Test assets are kept apart from your real assets: a test request reads, browses, and exports only test assets, and a production request never sees them. An export created in one environment returns `404` in the other. > **Test assets last 7 days** > > An asset created or imported in the test environment is deleted 7 days after it is created. Updating it does not > extend that. After it is deleted it no longer appears in `GET /assets`, `GET /assets/{id}`, or new exports, so do > not rely on a test asset for longer than 7 days; create or import it again when you need it. See [Test REST Environment](/rest/test-environment) for how the test environment works. ## Authentication Every Assets endpoint requires a Public REST API token. Create the token in the [developer dashboard](https://developer.sibipro.com), grant it the scopes below, then send it as `Authorization: Bearer `. | Endpoint | Scope | | --- | --- | | `GET /assets`, `GET /assets/{id}` | `read:assets` | | `POST /assets/exports` | `create:asset-exports` | | `GET /assets/exports/{id}` | `read:asset-exports` | A request with a token that lacks the scope receives a `403` with code `INSUFFICIENT_SCOPE`; a token issued for the GraphQL API receives a `403` with code `REST_TOKEN_REQUIRED`. ## Next Steps 1. **Review Documentation** Read through API reference and authentication requirements 2. **Development** Try listing assets for a property by address 3. **Production** Go live with your integration ## Endpoints **[Assets endpoints](/api-reference/assets)** Every endpoint with parameters, response schemas, and code samples. --- # Get asset Source: https://docs.sibipro.com/api-reference/assets/operations/get-asset One asset by its id, in the same shape as an item of the listing: its product identity, install address, dimensions, and warranty coverage windows. The id is accepted as this API serves it (`as_`-prefixed) or without the prefix. Responds 404 when no asset with that id exists, or when the caller is not authorized to view it. `GET /{id}` **Responses** - `200` — The asset - `400` — Invalid input parameters (VALIDATION\_ERROR) - `401` — The Authorization header is missing, or the bearer token could not be resolved (invalid, expired, or revoked) - `403` — The token is missing the scope this operation requires (INSUFFICIENT\_SCOPE), is a GraphQL token rather than a REST API token (REST\_TOKEN\_REQUIRED), or it was minted for the other environment (TOKEN\_ENVIRONMENT\_MISMATCH) - `404` — No asset with this id exists, or the caller is not authorized to view it — the two are deliberately indistinguishable - `500` — Internal server error - `503` — The token-exchange service is unavailable or misconfigured — retry shortly. Not a token problem. Response example, 200: ```json { "id": "as_aBcD1234", "createdAt": "string", "manufacturer": "string", "viewUrl": "string", "name": "string", "sku": "string", "serialNumber": "string", "externalId": "hvac-unit-7", "externalMetadata": { "costCenter": "CC-114" }, "installedAt": "2020-06-15T14:30:00.000Z", "category": "string", "subcategories": [ "string" ], "returned": true, "poNumber": "string", "orderId": "string", "propertyAddress": { "line1": "string", "line2": "string", "city": "string", "stateOrProvince": "string", "postalCode": "string" }, "property": { "externalId": "string" }, "dimensions": { "height": 0, "heightUnit": "string", "width": 0, "widthUnit": "string", "depth": 0, "depthUnit": "string", "length": 0, "lengthUnit": "string" }, "warrantyCoverages": [ { "startDate": "string", "endDate": "string", "description": "One-year GE manufacturer warranty covering parts and labor for defects in materials or workmanship." } ] } ``` --- # List assets Source: https://docs.sibipro.com/api-reference/assets/operations/list-assets A page of the assets the caller can see, each carrying its product identity, install address, dimensions, and warranty coverage windows. With no `address` this lists every asset the caller can see, oldest first by creation time; it is meant for exports, not realtime use. Supply `address` to narrow to the assets installed at one property. Page by passing the previous response’s `next` back as `after` until `next` is null. A page can come back shorter than `first` and still carry a cursor. `GET /` **Responses** - `200` — Assets the caller is authorized to view - `400` — Invalid input parameters (VALIDATION\_ERROR), or \`after\` is not a cursor this endpoint issued (INVALID\_CURSOR) - `401` — The Authorization header is missing, or the bearer token could not be resolved (invalid, expired, or revoked) - `403` — The token is missing the scope this operation requires (INSUFFICIENT\_SCOPE), is a GraphQL token rather than a REST API token (REST\_TOKEN\_REQUIRED), or it was minted for the other environment (TOKEN\_ENVIRONMENT\_MISMATCH) - `500` — Internal server error - `503` — The token-exchange service is unavailable or misconfigured — retry shortly. Not a token problem. Response example, 200: ```json { "items": [ { "id": "as_aBcD1234", "createdAt": "string", "manufacturer": "string", "viewUrl": "string", "name": "string", "sku": "string", "serialNumber": "string", "externalId": "hvac-unit-7", "externalMetadata": { "costCenter": "CC-114" }, "installedAt": "2020-06-15T14:30:00.000Z", "category": "string", "subcategories": [ "string" ], "returned": true, "poNumber": "string", "orderId": "string", "propertyAddress": { "line1": "string", "line2": "string", "city": "string", "stateOrProvince": "string", "postalCode": "string" }, "property": { "externalId": "string" }, "dimensions": { "height": 0, "heightUnit": "string", "width": 0, "widthUnit": "string", "depth": 0, "depthUnit": "string", "length": 0, "lengthUnit": "string" }, "warrantyCoverages": [ { "startDate": "string", "endDate": "string", "description": "One-year GE manufacturer warranty covering parts and labor for defects in materials or workmanship." } ] } ], "next": "string" } ``` --- # Draft Orders API Source: https://docs.sibipro.com/api-reference/draft-orders RESTful API for pricing an order before placing it, and for placing the order a draft describes Version 1.0.0 Base URL: `https://api.sibipro.com/draft-orders` ## Operations - [`POST /`](/api-reference/draft-orders/operations/create-draft-order) — Create draft order. - [`GET /{id}`](/api-reference/draft-orders/operations/get-draft-order) — Get draft order. - [`POST /{id}/order`](/api-reference/draft-orders/operations/create-order-from-draft) — Create order from draft. --- # Draft Orders Guide Source: https://docs.sibipro.com/api-reference/draft-orders/guide A **draft order** prices an order *without* placing it. It takes the same body as [`POST /orders`](/api-reference/orders) and returns what that order would resolve to — the distribution center, fulfillment method, delivery date, and payment method it would get, the alternatives available for each, per-line availability, options, addons, and warranties, and the full pricing breakdown. A draft can then be placed by id, so the order that ships is the one that was quoted. ## Benefits - **Quote before you commit:** See the total, taxes, and fees before anything is placed - **Discover the choices:** Every available fulfillment method, delivery date, payment method, addon, and warranty comes back resolved for the order in hand - **Catch failures early:** Validation runs exactly as it does at placement, so a bad supplier, SKU, or option fails on the draft instead of on the order - **Quote, then place it:** Place the draft by id and the order takes exactly the options and pricing the draft resolved — no body to reassemble and nothing to drift ## Core Concepts **Draft Order** A priced, validated preview of an order. It reserves nothing and charges nothing. **Resolved Defaults** The distribution center, fulfillment method, delivery date, and payment method the order would get when the request leaves them unspecified. **Availability** Per-line stock status in the draft's distribution center: `IN_STOCK`, `OUT_OF_STOCK`, `SUBSTITUTION_ONLY`, `UNAVAILABLE`, or `UNKNOWN`. **Pricing** Subtotal, tax, fees, and discounts, plus the `totalPriceCents` the order would charge. ## Creating a Draft Order `POST https://api.sibipro.com/draft-orders` with a `create:draft-orders` scoped [REST API token](/getting-started/rest-tokens). The body is the `POST /orders` body — at minimum a `supplier`, an `address`, `contactInfo`, and one or more `lineItems`. Unlike `POST /orders`, `paymentMethodId` is optional: leave it out and the draft resolves your default payment method and lists every alternative in `availablePaymentMethods`, so a draft is how you discover which `paymentMethodId` values you can place an order with. ```shell Curl curl \ --request POST \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "supplier": "ge", "address": { "line1": "1630 W Guadalupe Rd", "city": "Gilbert", "stateOrProvince": "AZ", "postalCode": "85233" }, "contactInfo": { "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", "phone": "1234567890" }, "lineItems": [{ "sku": "GDF510PSRSS", "quantity": 1 }], "paymentMethodId": "MANUFACTURER_CREDIT" }' \ https://api.sibipro.com/draft-orders ``` ```javascript Fetch const response = await fetch('https://api.sibipro.com/draft-orders', { method: 'POST', headers: { Authorization: `Bearer ${yourApiKey}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ supplier: 'ge', address: { line1: '1630 W Guadalupe Rd', city: 'Gilbert', stateOrProvince: 'AZ', postalCode: '85233', }, contactInfo: { firstName: 'John', lastName: 'Doe', email: 'john.doe@example.com', phone: '1234567890', }, lineItems: [{ sku: 'GDF510PSRSS', quantity: 1 }], paymentMethodId: 'MANUFACTURER_CREDIT', }), }); const draftOrder = await response.json(); ``` A successful call returns `201` with the draft order: ```json Response { "id": "01J9X0N3K7Q2VWY5B8ZC4TDR6H", "createdAt": "2026-08-31T00:00:00.000Z", "supplier": "ge", "address": { "line1": "1630 W Guadalupe Rd", "line2": null, "city": "Gilbert", "stateOrProvince": "AZ", "postalCode": "85233", "country": "USA" }, "contactInfo": { "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", "phone": "1234567890" }, "poNumber": null, "specialInstructions": null, "lineItems": [ { "sku": "GDF510PSRSS", "name": "GE Dishwasher", "subtitle": "Front Control with Plastic Interior", "imageUrl": "https://images.sibipro.com/GDF510PSRSS.jpg", "quantity": 1, "unitOfMeasure": "Each", "quantityPerBaseUnit": 1, "baseUnitOfMeasure": "Each", "priceCents": 54900, "availabilityStatus": "IN_STOCK", "options": [], "attributes": [{ "name": "finish", "value": "Stainless Steel" }], "addons": [], "availableAddons": [{ "id": "haul-away", "title": "Haul Away", "priceCents": 2500 }], "availableWarranties": [ { "sku": "GE-WARR-3YR", "name": "3 Year Protection Plan", "description": "Parts and labor for three years", "manufacturer": "GE", "priceCents": 9900 } ], "selectedWarranty": null } ], "distributionCenter": { "id": "ge-dc-phx", "name": "Phoenix DC", "storeNumber": "0412", "phone": "6025550134", "address": { "line1": "4000 E Air Ln", "line2": null, "city": "Phoenix", "stateOrProvince": "AZ", "postalCode": "85034", "country": "USA" } }, "fulfillmentMethod": { "id": "sibi-sibi-default-delivery", "title": "Standard Delivery", "description": null, "type": "DELIVERY", "availableDates": ["2026-09-01", "2026-09-02", "2026-09-03"] }, "availableFulfillmentMethods": [ { "id": "sibi-sibi-default-delivery", "title": "Standard Delivery", "description": null, "type": "DELIVERY", "availableDates": ["2026-09-01", "2026-09-02", "2026-09-03"] }, { "id": "sibi-sibi-default-pickup", "title": "Will Call", "description": "Pick up at the distribution center", "type": "PICKUP", "availableDates": ["2026-09-01"] } ], "requestedDeliveryDate": "2026-09-01", "paymentMethodId": "MANUFACTURER_CREDIT", "availablePaymentMethods": [ { "id": "MANUFACTURER_CREDIT", "type": "MANUFACTURER_CREDIT", "description": "On account", "last4": null } ], "pricing": { "subtotalCents": 54900, "taxCents": 4392, "totalPriceCents": 62292, "fees": [{ "name": "Delivery fee", "amountCents": 3000 }], "discounts": [] }, "subscribers": [] } ``` > **Note** > > `idempotencyKey` and `warrantyOrderPaymentMethodId` are accepted so the draft body and the order > body stay interchangeable, but they only take effect at placement and are ignored here. ## Fetching a Draft `GET https://api.sibipro.com/draft-orders/{id}` reads a draft back, with a `read:draft-orders` scoped token. The response is the body `POST /draft-orders` returned, so a caller that drafts, reads it back, then places it handles a single shape. ```shell Curl curl \ --request GET \ --header 'Authorization: Bearer ' \ https://api.sibipro.com/draft-orders/ ``` ```javascript Fetch const response = await fetch(`https://api.sibipro.com/draft-orders/${draftOrderId}`, { headers: { Authorization: `Bearer ${yourApiKey}` }, }); const draftOrder = await response.json(); ``` Nothing is repriced on read: the draft comes back as it was resolved, so it can describe availability or pricing that has since changed and still be rejected at placement. ## Reading the Draft The draft answers the questions you would otherwise have to guess at before placing the order. | What you want to know | Where to look | | --- | --- | | What will this cost? | `pricing.totalPriceCents`, broken out into `subtotalCents`, `taxCents`, `fees`, and `discounts` | | Is it in stock? | `lineItems[].availabilityStatus` | | When can it arrive? | `fulfillmentMethod.availableDates`, or `availableFulfillmentMethods[].availableDates` for the other methods | | How else can it be fulfilled? | `availableFulfillmentMethods` — each `id` is a `fulfillmentMethodId` | | How can it be paid for? | `availablePaymentMethods` — each `id` is a `paymentMethodId` | | Where would it ship from? | `distributionCenter` — its `id` is a `distributionCenterId` | | What can be added to a line? | `lineItems[].availableAddons` (each `id` is an `addonIds` entry) and `lineItems[].availableWarranties` (each `sku` is a `warrantySku`) | Prices are integer cents, dates are ISO 8601, and `quantityPerBaseUnit` × `quantity` gives the total in `baseUnitOfMeasure` for products sold by area or length. ## Placing the Draft `POST https://api.sibipro.com/draft-orders/{id}/order` places the order the draft describes, with a `create:from-draft:orders` scoped token. The draft id in the path *is* the request — nothing about the order can be changed here, so the order that ships is the one the draft priced. The body is optional and carries only an `idempotencyKey`. Send one: resubmitting the same draft with the same key within 5 minutes returns the order already placed instead of placing a second one. A 5xx response or a timeout does not prove the order was not placed, so retry only with the same key. ```shell Curl curl \ --request POST \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{"idempotencyKey": "b8f0e6d2-1c3a-4f5e-9a7b-0d2c4e6f8a1b"}' \ https://api.sibipro.com/draft-orders//order ``` ```javascript Fetch const response = await fetch(`https://api.sibipro.com/draft-orders/${draftOrder.id}/order`, { method: 'POST', headers: { Authorization: `Bearer ${yourApiKey}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ idempotencyKey }), }); const order = await response.json(); ``` A successful call returns `201` with the same body `POST /orders` returns, so a caller that drafts-then-places handles one response shape: ```json Response { "id": "SIBI-12345678", "orderUrl": "https://web.sibipro.com/orders/SIBI-12345678", "warrantyOrderId": null, "warrantyOrderUrl": null } ``` ### Changing an order before placing it A draft is fixed. To order something different — another fulfillment method, delivery date, payment method, distribution center, addon, or warranty — copy the chosen identifier out of the draft into the same body you drafted with and create a **new** draft, then place that one: 1. **Draft** Post the order body to `/draft-orders` and read the resolved defaults and alternatives 2. **Redraft to change** To change anything, copy the chosen `fulfillmentMethodId`, `requestedDeliveryDate`, `paymentMethodId`, `distributionCenterId`, `addonIds`, or `warrantySku` into the body and draft again 3. **Place** Post to `/draft-orders/{id}/order` with an `idempotencyKey` A draft becomes exactly one order. Posting to a draft that already has one is refused with `409 DRAFT_ORDER_ALREADY_PLACED`, and the message names the order it became so a caller that lost the response can pick that order up instead of retrying. > **Warning** > > A draft order reserves nothing. Pricing and availability are accurate as of the moment the draft > was created, and placement re-validates against live data — a draft that priced cleanly can still > be rejected if availability, a fulfillment date, or a payment method has changed since. Draft > immediately before placing rather than reusing an old draft. > **Note** > > `POST /orders` remains available for placing an order in one call, without drafting first. It > takes the same body and requires the `create:orders` scope. ## Errors Validation runs on the draft exactly as it does at placement, so both endpoints return the same `400` codes as `POST /orders` — `VALIDATION_ERROR`, `INVALID_SUPPLIER`, `PRODUCTS_NOT_FOUND`, `INVALID_PRODUCT_OPTIONS`, `NO_AVAILABLE_DELIVERY_METHODS`, and the rest of the list on that operation. Authentication and scope failures follow the usual codes; see [Making a REST Request](/rest/making-a-rest-request). Every draft-orders endpoint requires a REST API token: a token issued for the GraphQL API receives a `403` with code `REST_TOKEN_REQUIRED`. ```json Error { "code": "PRODUCTS_NOT_FOUND", "message": "The following products were not found: not-a-real-sku" } ``` Addressing a draft by id adds two more codes: | Status | Code | Meaning | Where | | --- | --- | --- | --- | | 404 | `DRAFT_ORDER_NOT_FOUND` | No draft order with this id is visible to the caller | Fetching and placing | | 409 | `DRAFT_ORDER_ALREADY_PLACED` | This draft has already been placed; the message names the order it became | Placing | An id that never existed and one belonging to another organization answer identically, so neither endpoint can be used to discover which draft ids exist. ```json Error { "code": "DRAFT_ORDER_ALREADY_PLACED", "message": "This draft order has already been placed as order SIBI-12345678" } ``` ## Testing The [test environment](/rest/test-environment) serves the same endpoints under `https://dev.sibi.pro/draft-orders*`, so a draft is created with `POST https://dev.sibi.pro/draft-orders`, read back with `GET https://dev.sibi.pro/draft-orders/{id}`, and placed with `POST https://dev.sibi.pro/draft-orders/{id}/order`. Mint a **test** REST API token for it — a production token sent to the test host, or a test token sent to `https://api.sibipro.com`, is refused with `403 TOKEN_ENVIRONMENT_MISMATCH`. Drafts priced there price against test data, and orders placed there trigger no real shipment or charge. ## Endpoints **[Draft Orders endpoints](/api-reference/draft-orders)** Every endpoint with parameters, response schemas, and code samples. --- # Create draft order Source: https://docs.sibipro.com/api-reference/draft-orders/operations/create-draft-order Prices an order without placing it, returning the resolved options, pricing, and availability for the request. The body has the same shape as `POST /orders`, so a caller can preview an order and then place the identical body. Three fields behave differently here. `paymentMethodId` is optional: omit it to draft against the default payment method of the caller and read the alternatives from `availablePaymentMethods` in the response. `idempotencyKey` and `warrantyOrderPaymentMethodId` are accepted so the bodies stay interchangeable, but they only take effect at placement and are ignored here. The response resolves every default the order would get — the distribution center, fulfillment method, delivery date, and payment method — and lists the alternatives available for each, alongside per-line availability, selected and available options, addons, and warranties, plus the subtotal, tax, fees, discounts, and total. Validation runs exactly as it does for `POST /orders`: failures return 400 with one of the codes listed on that operation. `POST /` **Request body** (`application/json`) - `supplier` (string) — The supplier to order from, identified by its slug. Required unless the deprecated \`seller\` is sent. - `seller` (string) — Deprecated: use \`supplier\` instead. Ignored when \`supplier\` is also sent. - `address` (OrderAddress, required) — The address must correspond to a valid property in the system. If the address is not valid, the request fails with an error. - `lineItems` (OrderLineItemInput[], required) — The products to order. At least one line item must be specified, and at most 100. - `contactInfo` (OrderContactInfo, required) — Contact information for the customer receiving the order. - `fulfillmentMethodId` (string) — Fulfillment method id for the order. If not provided, defaults to standard delivery. - `fulfillmentMethodType` (string) — Fulfillment method type for the order. Defaults to 'DELIVERY' when both are available. - `deliveryAddress` (object) - `shipToOfficePropertyId` (string) — Removed. Use \`deliveryAddress\`. Sending it fails with a 400. - `requestedDeliveryDate` (string) — The date the customer wants the order delivered. If not provided, defaults to the earliest available. If the provided date is not available, the request fails with an error. - `poNumber` (string) — A reference number of the caller's choosing. It does not need to be a number. - `specialInstructions` (string) — Free-form instructions for fulfillment. - `distributionCenterId` (string) — If omitted the order is placed in the closest distribution center. - `paymentMethodId` (string) — The payment method to price the draft against. If omitted, the caller's default payment method is used. The response reports the resolved \`paymentMethodId\` and lists every alternative in \`availablePaymentMethods\`, so a caller can draft without one to discover which payment methods are available. - `idempotencyKey` (string) — A unique identifier for the order. If the same order is submitted multiple times within 5 minutes with the same idempotency key, the API returns the existing order and does not create a new one. - `subscribers` (object[]) — An optional list of subscribers to receive updates about the order in addition to the user account that placed the order. Pass an empty list to opt out of status notifications. - `warrantyOrderPaymentMethodId` (string) — If provided, this payment method is used for the warranty sub-order instead of the parent order's \`paymentMethodId\`. Must be one of the warranty-order payment methods available to this caller. Request body example: ```json { "supplier": "ge", "seller": "ge", "address": { "line1": "1630 W Guadalupe Rd", "line2": "Ste 101", "city": "Gilbert", "stateOrProvince": "AZ", "postalCode": "85233", "country": "USA" }, "lineItems": [ { "sku": "GDF510PSRSS", "quantity": 1, "unitOfMeasure": "Each", "options": [ { "key": "ppg-paint-color", "value": "PPG1105-3" } ], "addonIds": [ "string" ], "addonTitles": [ "string" ], "warrantySku": "string", "applyWarrantyCoverage": true } ], "contactInfo": { "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", "phone": "1234567890" }, "fulfillmentMethodId": "sibi-sibi-default-delivery", "fulfillmentMethodType": "DELIVERY", "deliveryAddress": { "line1": "1630 W Guadalupe Rd", "line2": "Ste 101", "city": "Gilbert", "stateOrProvince": "AZ", "postalCode": "85233", "country": "USA" }, "shipToOfficePropertyId": "string", "requestedDeliveryDate": "2026-09-01", "poNumber": "PO-123456", "specialInstructions": "The lock code is 1234", "distributionCenterId": "string", "paymentMethodId": "MANUFACTURER_CREDIT", "idempotencyKey": "string", "subscribers": [ { "email": "updates@example.com" } ], "warrantyOrderPaymentMethodId": "string" } ``` **Responses** - `201` — The draft order was created. - `400` — Bad request - Invalid input data. See the POST /orders operation description for the possible error codes. - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - the token was minted for the other environment, is not a Public REST API token, or does not carry the scope this operation requires - `500` — Internal server error Response example, 201: ```json { "id": "string", "createdAt": "2026-08-31T00:00:00.000Z", "supplier": "ge", "address": { "line1": "1630 W Guadalupe Rd", "line2": "Ste 101", "city": "Gilbert", "stateOrProvince": "AZ", "postalCode": "85233", "country": "USA" }, "contactInfo": { "firstName": "string", "lastName": "string", "email": "string", "phone": "string" }, "poNumber": "string", "specialInstructions": "string", "lineItems": [ { "sku": "string", "name": "string", "subtitle": "string", "imageUrl": "string", "quantity": 0, "unitOfMeasure": "Each", "quantityPerBaseUnit": 23.77, "baseUnitOfMeasure": "sq ft", "priceCents": 0, "availabilityStatus": "IN_STOCK", "options": [ { "key": "ppg-paint-color", "value": "PPG1105-3", "name": "Delicate White", "hex": "#F0EFEA" } ], "attributes": [ { "name": "sheen", "value": "Satin" } ], "addons": [ { "id": "string", "title": "Haul Away", "priceCents": 0 } ], "availableAddons": [ { "id": "string", "title": "Haul Away", "priceCents": 0 } ], "availableWarranties": [ { "sku": "string", "name": "string", "description": "string", "manufacturer": "string", "priceCents": 0 } ], "selectedWarranty": { "sku": "string", "name": "string", "description": "string", "manufacturer": "string", "priceCents": 0 } } ], "distributionCenter": { "id": "ge-dc-lax", "name": "string", "storeNumber": "string", "phone": "6233885100", "address": { "line1": "1630 W Guadalupe Rd", "line2": "Ste 101", "city": "Gilbert", "stateOrProvince": "AZ", "postalCode": "85233", "country": "USA" } }, "fulfillmentMethod": { "id": "sibi-sibi-default-delivery", "title": "Standard Delivery", "description": "string", "type": "DELIVERY", "availableDates": [ "string" ] }, "availableFulfillmentMethods": [ { "id": "sibi-sibi-default-delivery", "title": "Standard Delivery", "description": "string", "type": "DELIVERY", "availableDates": [ "string" ] } ], "requestedDeliveryDate": "2026-09-01", "paymentMethodId": "string", "availablePaymentMethods": [ { "id": "MANUFACTURER_CREDIT", "type": "MANUFACTURER_CREDIT", "description": "On account", "last4": "string" } ], "pricing": { "subtotalCents": 0, "taxCents": 0, "totalPriceCents": 0, "fees": [ { "name": "string", "amountCents": 0 } ], "discounts": [ { "name": "string", "amountCents": 0 } ] }, "subscribers": [ { "email": "string" } ] } ``` Response example, 400 · validationError: ```json { "code": "VALIDATION_ERROR", "message": "Invalid input parameters" } ``` Response example, 400 · invalidSupplier: ```json { "code": "INVALID_SUPPLIER", "message": "Unknown supplier \"acme\"" } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing or invalid authentication token" } ``` Response example, 403 · environmentMismatch: ```json { "code": "TOKEN_ENVIRONMENT_MISMATCH", "message": "A test token was used against the production API. Test tokens only work against the Sibi test environment; use a production token here." } ``` Response example, 403 · restTokenRequired: ```json { "code": "REST_TOKEN_REQUIRED", "message": "This endpoint only accepts Public REST API tokens. Create one at https://developer.sibipro.com." } ``` Response example, 403 · insufficientScope: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `create:draft-orders` scope, which this endpoint requires. Create a token with the scopes you need at https://developer.sibipro.com." } ``` --- # Create order from draft Source: https://docs.sibipro.com/api-reference/draft-orders/operations/create-order-from-draft Places the order a draft describes, using the options, pricing, and defaults that draft resolved. The draft is addressed by the `id` returned from `POST /draft-orders`; nothing about the order can be changed here. To change it, create a new draft and place that one instead. A draft can only be placed once: a second request for a draft that already has an order returns 409 `DRAFT_ORDER_ALREADY_PLACED`, naming the order it became. Pass an `idempotencyKey` to make retries safe: resubmitting the same draft with the same key within 5 minutes returns the order already placed instead of placing a second one. This matters on failure: a 5xx response or a timeout does not guarantee the order was not placed, so retry only with the same `idempotencyKey`. A draft that does not exist and a draft belonging to another organization both return 404, so the endpoint cannot be used to discover which draft ids exist. Validation runs at placement exactly as it does for `POST /orders`, so a draft that priced cleanly can still be rejected with 400 if something it depends on — availability, a fulfillment date, a payment method — has changed since it was drafted. The codes are the ones listed on `POST /orders`. `POST /{id}/order` **Request body** (`application/json`) - `idempotencyKey` (string) — Makes retries safe: resubmitting the same draft with the same key within 5 minutes returns the order already placed instead of placing a second one. Request body example: ```json { "idempotencyKey": "b8f0e6d2-1c3a-4f5e-9a7b-0d2c4e6f8a1b" } ``` **Responses** - `201` — The order was placed from the draft. - `400` — Bad request - the draft could not be placed. See the POST /orders operation description for the possible error codes. - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - The token is missing the scope this operation requires, or was minted for the other environment - `404` — Not found - no draft order with this id is visible to the caller - `409` — Conflict - this draft has already been placed; the response names the order it became - `500` — Internal server error Response example, 201: ```json { "id": "SIBI-12345678", "orderUrl": "https://web.sibipro.com/orders/SIBI-12345678", "warrantyOrderId": "string", "warrantyOrderUrl": "string" } ``` Response example, 400 · validationError: ```json { "code": "VALIDATION_ERROR", "message": "Invalid input parameters" } ``` Response example, 400 · noAvailableFulfillmentDates: ```json { "code": "NO_AVAILABLE_FULFILLMENT_DATES", "message": "No fulfillment dates are available for this order" } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing or invalid authentication token" } ``` Response example, 403 · environmentMismatch: ```json { "code": "TOKEN_ENVIRONMENT_MISMATCH", "message": "A test token was used against the production API. Test tokens only work against the Sibi test environment; use a production token here." } ``` Response example, 403 · restTokenRequired: ```json { "code": "REST_TOKEN_REQUIRED", "message": "This endpoint requires a REST API token from the developer dashboard." } ``` Response example, 403 · insufficientScope: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `create:from-draft:orders` scope, which this endpoint requires. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 404: ```json { "code": "DRAFT_ORDER_NOT_FOUND", "message": "Draft order not found" } ``` Response example, 409: ```json { "code": "DRAFT_ORDER_ALREADY_PLACED", "message": "This draft order has already been placed as order SIBI-12345678" } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred" } ``` --- # Get draft order Source: https://docs.sibipro.com/api-reference/draft-orders/operations/get-draft-order Retrieves a draft order by the `id` returned from `POST /draft-orders`, with the options, pricing, and availability that draft resolved. The body is the one `POST /draft-orders` returns, so a caller that drafts, reads the draft back, then places it with `POST /draft-orders/{id}/order` handles a single shape. The draft is returned as it was resolved: nothing is repriced on read, so a draft can describe availability or pricing that has since changed, and placing it can still be rejected. A draft that does not exist and a draft belonging to another organization both return 404, so the endpoint cannot be used to discover which draft ids exist. `GET /{id}` **Responses** - `200` — The draft order was found. - `400` — Bad request - Invalid input data - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - The token is missing the scope this operation requires, or was minted for the other environment - `404` — Not found - no draft order with this id is visible to the caller - `500` — Internal server error Response example, 200: ```json { "id": "string", "createdAt": "2026-08-31T00:00:00.000Z", "supplier": "ge", "address": { "line1": "1630 W Guadalupe Rd", "line2": "Ste 101", "city": "Gilbert", "stateOrProvince": "AZ", "postalCode": "85233", "country": "USA" }, "contactInfo": { "firstName": "string", "lastName": "string", "email": "string", "phone": "string" }, "poNumber": "string", "specialInstructions": "string", "lineItems": [ { "sku": "string", "name": "string", "subtitle": "string", "imageUrl": "string", "quantity": 0, "unitOfMeasure": "Each", "quantityPerBaseUnit": 23.77, "baseUnitOfMeasure": "sq ft", "priceCents": 0, "availabilityStatus": "IN_STOCK", "options": [ { "key": "ppg-paint-color", "value": "PPG1105-3", "name": "Delicate White", "hex": "#F0EFEA" } ], "attributes": [ { "name": "sheen", "value": "Satin" } ], "addons": [ { "id": "string", "title": "Haul Away", "priceCents": 0 } ], "availableAddons": [ { "id": "string", "title": "Haul Away", "priceCents": 0 } ], "availableWarranties": [ { "sku": "string", "name": "string", "description": "string", "manufacturer": "string", "priceCents": 0 } ], "selectedWarranty": { "sku": "string", "name": "string", "description": "string", "manufacturer": "string", "priceCents": 0 } } ], "distributionCenter": { "id": "ge-dc-lax", "name": "string", "storeNumber": "string", "phone": "6233885100", "address": { "line1": "1630 W Guadalupe Rd", "line2": "Ste 101", "city": "Gilbert", "stateOrProvince": "AZ", "postalCode": "85233", "country": "USA" } }, "fulfillmentMethod": { "id": "sibi-sibi-default-delivery", "title": "Standard Delivery", "description": "string", "type": "DELIVERY", "availableDates": [ "string" ] }, "availableFulfillmentMethods": [ { "id": "sibi-sibi-default-delivery", "title": "Standard Delivery", "description": "string", "type": "DELIVERY", "availableDates": [ "string" ] } ], "requestedDeliveryDate": "2026-09-01", "paymentMethodId": "string", "availablePaymentMethods": [ { "id": "MANUFACTURER_CREDIT", "type": "MANUFACTURER_CREDIT", "description": "On account", "last4": "string" } ], "pricing": { "subtotalCents": 0, "taxCents": 0, "totalPriceCents": 0, "fees": [ { "name": "string", "amountCents": 0 } ], "discounts": [ { "name": "string", "amountCents": 0 } ] }, "subscribers": [ { "email": "string" } ] } ``` Response example, 400: ```json { "code": "VALIDATION_ERROR", "message": "Invalid input parameters" } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing or invalid authentication token" } ``` Response example, 403 · environmentMismatch: ```json { "code": "TOKEN_ENVIRONMENT_MISMATCH", "message": "A test token was used against the production API. Test tokens only work against the Sibi test environment; use a production token here." } ``` Response example, 403 · restTokenRequired: ```json { "code": "REST_TOKEN_REQUIRED", "message": "This endpoint requires a REST API token from the developer dashboard." } ``` Response example, 403 · insufficientScope: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `read:draft-orders` scope, which this endpoint requires. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 404: ```json { "code": "DRAFT_ORDER_NOT_FOUND", "message": "Draft order not found" } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred" } ``` --- # Feedback API Source: https://docs.sibipro.com/api-reference/feedback Send the Sibi team feedback, questions, and error reports about the Sibi Public API Version 1.0.0 Base URL: `https://api.sibipro.com/feedback` ## Operations - [`POST /`](/api-reference/feedback/operations/create-feedback) — Send feedback. --- # Feedback Guide Source: https://docs.sibipro.com/api-reference/feedback/guide Use `POST /feedback` to tell us about the Sibi Public API: a question, an error you are receiving, a missing capability, or anything else. We read every message. You do not need to say who you are. We identify the user and the organization from your API token. We do not reply through the API. If we need more detail, we contact you through your usual Sibi channel. ## Send feedback The token needs the `create:feedback` scope. The body has one field, `message`, in plain text of up to 4,000 characters. ```bash curl -X POST https://api.sibipro.com/feedback \ -H "Authorization: Bearer $SIBI_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{"message": "POST /orders returns 500 when a line item has a paint color option. at about 14:05 UTC on 2026-10-01."}' ``` The response is `202 Accepted` with a receipt. Quote the `id` if you contact us about this message. ```json { "id": "fb_3f0c2a9e-6d1b-4c47-9a35-0e8f2b7d5c11", "receivedAt": "2026-10-01T16:04:11.000Z" } ``` ## Report an error Include these in the message, so we can find the request: - The method and path you called, for example `POST /orders` - The time of the request - The status code and the response body you received Do not include API tokens, passwords, or payment details. ## Limits | Limit | Value | | --- | --- | | Message length | 4,000 characters | | Request body | 16 KB | | Messages per user | About 5 per minute, about 20 per hour | Above the rate limit, the endpoint returns `429 RATE_LIMITED` with a `Retry-After` header that gives the number of seconds to wait. A short burst of requests can also get a `429` without a body; wait a few seconds and send again. If the endpoint returns `503 FEEDBACK_UNAVAILABLE`, send the message again later. --- # Send feedback Source: https://docs.sibipro.com/api-reference/feedback/operations/create-feedback Sends feedback about the Sibi Public API to the Sibi team: a question, an error you are receiving, a missing capability, or anything else. We read every submission, and we use the token to identify the user and organization that sent it, so you do not need to include them. We do not reply through the API. If we need more detail, we contact you through your usual Sibi channel. The body is one plain-text `message`. When you report an error, include the method and path you called, the time of the request, and the response you received, so we can find the request. Each user can send about 5 messages per minute and about 20 per hour. Above that, the endpoint returns 429 with a `Retry-After` header. A short burst of requests can also get a 429 without a body; wait a few seconds and send again. `POST /` **Request body** (`application/json`, required) - `message` (string, required) — Your feedback, question, or error report, in plain text, up to 4000 characters. When you report an error, include the method and path you called, the time of the request, and the response you received. Request body example: ```json { "message": "POST /orders returns 500 when a line item has a paint color option, at about 14:05 UTC on 2026-10-01." } ``` **Responses** - `202` — We received the feedback. - `400` — Bad request - the body is not valid JSON, has fields other than \`message\`, or the message is empty or too long - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - the token was minted for the other environment, is not a Public REST API token, or does not carry the \`create:feedback\` scope - `413` — Payload too large - the request body is larger than 16384 bytes - `415` — Unsupported media type - the body is not sent as \`application/json\` - `429` — Too many requests - this user sent too much feedback in a short time. Wait for the number of seconds in \`Retry-After\`. - `500` — Internal server error - `503` — Service unavailable - we could not record the feedback. Send it again later. Response example, 202: ```json { "id": "fb_3f0c2a9e-6d1b-4c47-9a35-0e8f2b7d5c11", "receivedAt": "2026-10-01T16:04:11.000Z" } ``` Response example, 400: ```json { "code": "VALIDATION_ERROR", "message": "Invalid input parameters" } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing authentication token" } ``` Response example, 403 · environmentMismatch: ```json { "code": "TOKEN_ENVIRONMENT_MISMATCH", "message": "A test token was used against the production API. Test tokens only work against the Sibi test environment; use a production token here." } ``` Response example, 403 · restTokenRequired: ```json { "code": "REST_TOKEN_REQUIRED", "message": "This endpoint only accepts Public REST API tokens. Create one at https://developer.sibipro.com." } ``` Response example, 403 · insufficientScope: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `create:feedback` scope, which this endpoint requires. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 413: ```json { "code": "PAYLOAD_TOO_LARGE", "message": "The request body is larger than 16384 bytes" } ``` Response example, 415: ```json { "code": "UNSUPPORTED_MEDIA_TYPE", "message": "Send the request body as application/json" } ``` Response example, 429: ```json { "code": "RATE_LIMITED", "message": "Too many feedback requests. Try again later." } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred" } ``` Response example, 503: ```json { "code": "FEEDBACK_UNAVAILABLE", "message": "Feedback could not be delivered. Try again later." } ``` --- # Invoices API Source: https://docs.sibipro.com/api-reference/invoices List invoices. Reads are scoped to what the authenticated caller's organization is authorized to see. Version 1.0.0 Base URL: `https://api.sibipro.com/invoices` ## Operations - [`GET /`](/api-reference/invoices/operations/list-invoices) — List invoices. --- # List invoices Source: https://docs.sibipro.com/api-reference/invoices/operations/list-invoices List the invoices visible to the caller's organization. `searchTerm` is a loose free-text search (matched against invoice number, PO number, seller name, property address, and line-item SKUs/descriptions/serial numbers). Cursor-paginated: keep passing the response's `next` back as `after` until it is null to see every invoice. `GET /` **Responses** - `200` — Invoices visible to the caller's organization - `400` — Invalid input parameters (VALIDATION\_ERROR). - `401` — The Authorization header is missing, or the bearer token could not be resolved (invalid, expired, or revoked) - `403` — The token is missing the scope this operation requires (INSUFFICIENT\_SCOPE), or it was minted for the other environment (TOKEN\_ENVIRONMENT\_MISMATCH) - `500` — Internal server error - `503` — The token-exchange service is unavailable or misconfigured — retry shortly. Not a token problem. Response example, 200: ```json { "items": [ { "invoiceNumber": "string", "orderId": "string", "poNumber": "string", "invoiceDate": "2026-07-01T00:00:00.000Z", "dueDate": "2026-07-31T00:00:00.000Z", "seller": "string", "sellerName": "string", "property": { "address": { "line1": "string", "line2": "string", "city": "string", "stateOrProvince": "string", "postalCode": "string", "country": "string" } }, "accountNumber": "string", "taxCents": 0, "totalCents": 0, "lineItems": [ { "sku": "string", "description": "string", "quantity": 0, "unitPriceCents": 0, "serialNumber": "string" } ], "fees": [ { "name": "string", "amountCents": 0 } ], "discounts": [ { "name": "string", "amountCents": 0 } ], "invoiceId": "in_V1StGXR8_Z5jdHi6BmyT" } ], "next": "string" } ``` --- # Offers API Source: https://docs.sibipro.com/api-reference/offers RESTful API for managing offers Version 1.0.0 Base URL: `https://api.sibipro.com/offers` ## Operations - [`GET /sub-brands`](/api-reference/offers/operations/get-sub-brands) — Get sub-brands. - [`GET /{id}`](/api-reference/offers/operations/get-id) — Get offer. - [`GET /`](/api-reference/offers/operations/get) — Get offers. - [`POST /`](/api-reference/offers/operations/post) — Create offer. - [`POST /{id}/buyout`](/api-reference/offers/operations/post-id-buyout) — Update offer buyout amount. - [`POST /{id}/credit`](/api-reference/offers/operations/post-id-credit) — Update offer credit amount. - [`POST /{id}/send`](/api-reference/offers/operations/post-id-send) — Send offer. - [`POST /{id}/cancel`](/api-reference/offers/operations/post-id-cancel) — Cancel offer. - [`POST /{id}/accept-buyout`](/api-reference/offers/operations/post-id-accept-buyout) — Accept offer buyout. - [`POST /{id}/accept`](/api-reference/offers/operations/post-id-accept) — Accept offer. --- # Offers Guide Source: https://docs.sibipro.com/api-reference/offers/guide Offers are the core mechanism for resolving home warranty claims, providing customers with replacement products, upgrades, or buyout options. ## Benefits - **Operational:** Automate claim processing, standardize workflows, and reduce manual work - **Financial:** Generate upgrade revenue while reducing processing costs - **Customer:** Provide clear options, quick resolutions, and transparent self-service choices ## Core Concepts **Replacement Product** Base product covered by warranty **Buyout** Cash settlement option for claim resolution **Upgrade** Premium product available for additional cost **Credit** Amount the customer has to spend in the marketplace. Defaults to the price of the replacement product and add-ons; set `creditAmount` when creating the offer to use your own value. **Difference Payment** Amount customer pays for upgrade (upgrade price minus credit) **Add-On** Optional services or parts (e.g. Install, Disposal, recommended parts) bundled with the replacement at offer creation. **Curator** The role that prepares an offer — chooses the replacement, attaches add-ons, and may accept on the customer's behalf. ## Offer States 1. **Pending** Initial offer creation **Next states:** - Generating Upgrades - Ready 2. **Generating Upgrades** Computing upgrade options **Next states:** - Ready 3. **Ready** Prepared to send to customer **Next states:** - Awaiting Customer - Canceled 4. **Awaiting Customer** Sent to customer **Next states:** - Order Placed - Buyout Selected - Expired - Canceled ### Terminal States **Order Placed** Customer selected replacement product **Buyout Selected** Customer chose cash settlement **Canceled** Offer terminated **Expired** Past validity period ## Customer Experience **Accept Replacement** Get your covered replacement product delivered and installed at no additional cost. **Choose Buyout** Receive a cash settlement directly to handle the replacement yourself. **Select Upgrade** Choose an upgrade product and pay the difference between your coverage and the upgrade price. ## Next Steps 1. **Review Documentation** Read through API reference and authentication requirements 2. **Development** Set up test environment and create sample offers 3. **Testing** Test customer experience and monitor metrics 4. **Production** Go live with your integration ## Endpoints **[Offers endpoints](/api-reference/offers)** Every endpoint with parameters, response schemas, and code samples. --- # Get offers Source: https://docs.sibipro.com/api-reference/offers/operations/get Search and list offers with optional filtering by status, search term, and pagination. `GET /` **Responses** - `200` — Offers retrieved successfully - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - The presented token does not carry the required scope - `500` — Internal server error Response example, 200: ```json { "offers": [ { "id": "string", "status": "pending", "thirdPartyId": "string" } ], "totalCount": 0, "statuses": [ { "status": "pending", "count": 0 } ], "pageInfo": { "hasNextPage": true, "hasPreviousPage": true } } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing authentication token" } ``` Response example, 403: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `read:offers` scope, which this endpoint requires. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred" } ``` --- # Get offer Source: https://docs.sibipro.com/api-reference/offers/operations/get-id Retrieves an offer by its ID. `GET /{id}` **Responses** - `200` — Offer retrieved successfully - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - Caller is not allowed to view this offer - `404` — Not found - Offer does not exist - `500` — Internal server error Response example, 200: ```json { "id": "offer-123", "orderIds": [ "string" ], "thirdPartyId": "ext-123", "customerName": "string", "customerEmail": "string", "customerPhone": "string", "fullAddress": "string", "line1": "string", "line2": "string", "city": "string", "stateOrProvince": "string", "postalCode": "string", "status": "pending", "generatingUpsells": true, "processing": true, "acceptedByRole": "curator", "offerSentAt": "string", "selectedOffering": [ { "productId": "string", "curatorSelectedAddons": [ { "addonId": "string" } ], "customerSelectedAddons": [ { "addonId": "string" } ] } ], "offerings": [ { "products": [ { "productId": "string", "curatorSelectedAddons": [ { "addonId": "string" } ] } ] } ], "buyoutAmountCents": 50000, "creditAmountCents": 75000, "companySpendCents": 0, "customerSpendCents": 0, "offerPricingBreakdown": { "subtotal": 0, "tax": 0, "total": 0, "discounts": [ { "amount": 0 } ], "fees": [ { "amount": 0 } ], "pricedItems": [ { "id": "string", "title": "string", "purchasePrice": 0, "addons": [ { "id": "string", "title": "string", "purchasePrice": 0 } ] } ] } } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing authentication token" } ``` Response example, 403 · insufficientScope: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `read:offers` scope, which this endpoint requires. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 403 · permissionDenied: ```json { "code": "FORBIDDEN", "message": "User does not have permission to view this offer" } ``` Response example, 404: ```json { "code": "OFFER_NOT_FOUND", "message": "Offer not found" } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred" } ``` --- # Get sub-brands Source: https://docs.sibipro.com/api-reference/offers/operations/get-sub-brands Get all sub-brands associated with your organization. `GET /sub-brands` **Responses** - `200` — Sub-brands retrieved successfully - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - The presented token does not carry the required scope - `404` — Not found - No sub-brands exist for the organization - `500` — Internal server error Response example, 200: ```json [ { "id": "9OYmJkDZ8ijU4c", "name": "SIBI Home Warranty" }, { "id": "vgYOuUeTC8mJRl", "name": "SIBI Expanded Warranty" } ] ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing authentication token" } ``` Response example, 403: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `read:offers` scope, which this endpoint requires. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 404: ```json { "code": "SUB_BRANDS_NOT_FOUND", "message": "No sub-brands found" } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred" } ``` --- # Create offer Source: https://docs.sibipro.com/api-reference/offers/operations/post `POST /` **Request body** (`application/json`) - `customer` (Customer, required) - `address` (object, required) — Delivery address details - `product` (object, required) — Replacement product and add-ons covered by warranty - `sendOfferImmediately` (boolean) — Whether to send the offer email immediately after creation - `allowCommonCarrier` (boolean) — Whether to allow offers for common carrier delivery properties - `externalJobID` (string) - `buyoutAmount` (number) — Buyout amount in cents (e.g., 50000 = $500.00). Customer can opt to receive this amount instead of a replacement product. - `creditAmount` (integer) — Credit amount in cents (e.g., 200000 = $2,000.00) that the customer has to spend in the marketplace. When omitted, defaults to the price of the replacement product and add-ons. - `includeUpsells` (boolean) — Whether to include upsells in the offer - `subBrandId` (string, required) — The ID of the sub-brand used to determine customer-facing branding for the offer Request body example: ```json { "customer": { "firstName": "John", "lastName": "Doe", "email": "john@example.com", "phone": "+1 (123) 456-7890" }, "address": { "line1": "123 Main St", "line2": "Apt 101", "city": "Springfield", "stateOrProvince": "IL", "postalCode": "62701" }, "product": { "sku": "GDF511PGRBB", "addons": [ { "id": "install-aggregate-id", "quantity": 1 }, { "sku": "M007", "quantity": 1 }, { "sku": "M021", "quantity": 1 } ] }, "sendOfferImmediately": true, "allowCommonCarrier": true, "externalJobID": "string", "buyoutAmount": 50000, "creditAmount": 200000, "includeUpsells": true, "subBrandId": "string" } ``` **Responses** - `201` — Offer created successfully - `400` — Bad request - Invalid input data - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - The presented token does not carry the required scope - `500` — Internal server error Response example, 201: ```json { "id": "testofferid", "address": { "line1": "string", "line2": "string", "city": "string", "stateOrProvince": "st", "postalCode": "string", "country": "USA" }, "createdAt": "2024-01-20T12:00:00Z", "customerOfferLink": "string", "warnings": [ "This product is only available via common carrier delivery for the selected address." ] } ``` Response example, 400 · validationError: ```json { "code": "VALIDATION_ERROR", "message": "Invalid input parameters", "details": [ { "field": "customer.email", "error": "Invalid email" }, { "field": "address.postalCode", "error": "Invalid" } ] } ``` Response example, 400 · invalidAddress: ```json { "code": "ADDRESS_PROCESSING_ERROR", "message": "The provided address is invalid or could not be found" } ``` Response example, 400 · invalidSubBrandId: ```json { "code": "INVALID_SUB_BRAND_ID", "message": "The provided sub-brand ID is invalid or not found" } ``` Response example, 400 · productOutOfStock: ```json { "code": "PRODUCT_OUT_OF_STOCK", "message": "Product 123 is out of stock for the selected address." } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing authentication token" } ``` Response example, 403: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `write:offers` scope, which this endpoint requires. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred" } ``` --- # Accept offer Source: https://docs.sibipro.com/api-reference/offers/operations/post-id-accept Accepts an offer by placing orders for its included offering. `POST /{id}/accept` **Responses** - `200` — Offer accepted successfully - `400` — Bad request - Offer is not in an acceptable state - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - Caller can view this offer but is not allowed to accept it - `404` — Not found - Offer does not exist or caller is not allowed to view it - `500` — Internal server error Response example, 200: ```json { "success": true, "acceptedAt": "2024-01-20T12:00:00Z" } ``` Response example, 400 · offerAcceptanceNotAllowed: ```json { "code": "OFFER_ACCEPTANCE_NOT_ALLOWED", "message": "Offer cannot be accepted in its current status" } ``` Response example, 400 · includedOfferingNotFound: ```json { "code": "INCLUDED_OFFERING_NOT_FOUND", "message": "Offer has no included offering" } ``` Response example, 400 · offerAcceptanceError: ```json { "code": "OFFER_ACCEPTANCE_ERROR", "message": "Failed to accept offer" } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing authentication token" } ``` Response example, 403 · insufficientScope: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `write:offers` scope, which this endpoint requires. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 403 · permissionDenied: ```json { "code": "FORBIDDEN", "message": "User does not have permission to accept this offer" } ``` Response example, 404: ```json { "code": "OFFER_NOT_FOUND", "message": "Offer not found" } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred" } ``` --- # Accept offer buyout Source: https://docs.sibipro.com/api-reference/offers/operations/post-id-accept-buyout Accepts the buyout on an offer. The offer must be in "pending" or "awaiting_customer" status. `POST /{id}/accept-buyout` **Responses** - `200` — Offer buyout accepted successfully - `400` — Bad request - Offer buyout could not be accepted - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - Caller can view this offer but is not allowed to accept it - `404` — Not found - Offer does not exist or caller is not allowed to view it - `500` — Internal server error Response example, 200: ```json { "success": true, "acceptedAt": "2024-01-20T12:00:00Z" } ``` Response example, 400 · offerBuyoutNotAllowed: ```json { "code": "OFFER_BUYOUT_NOT_ALLOWED", "message": "Offer buyout cannot be accepted because it is in \"canceled\" status" } ``` Response example, 400 · offerBuyoutAcceptanceError: ```json { "code": "OFFER_BUYOUT_ACCEPTANCE_ERROR", "message": "Failed to accept offer buyout" } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing authentication token" } ``` Response example, 403 · insufficientScope: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `write:offers` scope, which this endpoint requires. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 403 · permissionDenied: ```json { "code": "FORBIDDEN", "message": "User does not have permission to accept this offer" } ``` Response example, 404: ```json { "code": "OFFER_NOT_FOUND", "message": "Offer not found" } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred" } ``` --- # Update offer buyout amount Source: https://docs.sibipro.com/api-reference/offers/operations/post-id-buyout Updates the buyout amount on an offer. The offer must be in "pending" or "awaiting_customer" status. `POST /{id}/buyout` **Request body** (`application/json`) - `buyoutAmount` (number, required) — Buyout amount in cents (e.g., 50000 = $500.00). Customer can opt to receive this amount instead of a replacement product. Request body example: ```json { "buyoutAmount": 50000 } ``` **Responses** - `200` — Offer buyout amount updated successfully - `400` — Bad request - Offer buyout could not be updated - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - Caller can view this offer but is not allowed to update it - `404` — Not found - Offer does not exist or caller is not allowed to view it - `500` — Internal server error Response example, 200: ```json { "success": true, "buyoutAmount": 50000, "updatedAt": "2024-01-20T12:00:00Z" } ``` Response example, 400 · offerBuyoutUpdateNotAllowed: ```json { "code": "OFFER_BUYOUT_UPDATE_NOT_ALLOWED", "message": "Offer buyout cannot be updated because it is in \"canceled\" status" } ``` Response example, 400 · updateBuyoutAmountError: ```json { "code": "UPDATE_BUYOUT_AMOUNT_ERROR", "message": "Failed to update offer buyout amount" } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing authentication token" } ``` Response example, 403 · insufficientScope: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `write:offers` scope, which this endpoint requires. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 403 · permissionDenied: ```json { "code": "FORBIDDEN", "message": "User does not have permission to update this offer" } ``` Response example, 404: ```json { "code": "OFFER_NOT_FOUND", "message": "Offer not found" } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred" } ``` --- # Cancel offer Source: https://docs.sibipro.com/api-reference/offers/operations/post-id-cancel Cancels an offer. The offer must not already be in a resolved status (canceled, buyout accepted, order placed, or expired). `POST /{id}/cancel` **Responses** - `200` — Offer canceled successfully - `400` — Bad request - Offer is not in a cancelable state - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - Caller can view this offer but is not allowed to cancel it - `404` — Not found - Offer does not exist or caller is not allowed to view it - `500` — Internal server error Response example, 200: ```json { "offerId": "offer-123", "status": "CANCELED", "canceledAt": "2024-01-20T12:00:00Z" } ``` Response example, 400: ```json { "code": "OFFER_CANCELLATION_ERROR", "message": "Offer cannot be canceled because it is in \"canceled\" status" } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing authentication token" } ``` Response example, 403 · insufficientScope: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `write:offers` scope, which this endpoint requires. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 403 · permissionDenied: ```json { "code": "FORBIDDEN", "message": "User does not have permission to cancel this offer" } ``` Response example, 404: ```json { "code": "OFFER_NOT_FOUND", "message": "Offer not found" } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred" } ``` --- # Update offer credit amount Source: https://docs.sibipro.com/api-reference/offers/operations/post-id-credit Updates the credit amount on an offer. The offer must be in "pending" or "awaiting_customer" status. `POST /{id}/credit` **Request body** (`application/json`) - `creditAmount` (integer, required) — Credit amount in cents (e.g., 10000 = $100.00). Must be a non-negative integer. Request body example: ```json { "creditAmount": 10000 } ``` **Responses** - `200` — Offer credit amount updated successfully - `400` — Bad request - Offer credit could not be updated - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - Caller can view this offer but is not allowed to update it - `404` — Not found - Offer does not exist or caller is not allowed to view it - `500` — Internal server error Response example, 200: ```json { "success": true, "creditAmount": 10000, "updatedAt": "2024-01-20T12:00:00Z" } ``` Response example, 400 · offerCreditNotAllowed: ```json { "code": "OFFER_CREDIT_NOT_ALLOWED", "message": "Offer credit cannot be updated because it is in \"canceled\" status" } ``` Response example, 400 · updateCreditAmountError: ```json { "code": "UPDATE_CREDIT_AMOUNT_ERROR", "message": "Failed to update offer credit amount" } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing authentication token" } ``` Response example, 403 · insufficientScope: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `write:offers` scope, which this endpoint requires. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 403 · permissionDenied: ```json { "code": "FORBIDDEN", "message": "User does not have permission to update this offer" } ``` Response example, 404: ```json { "code": "OFFER_NOT_FOUND", "message": "Offer not found" } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred" } ``` --- # Send offer Source: https://docs.sibipro.com/api-reference/offers/operations/post-id-send Sends a pending offer to the customer. The offer must be in "pending" status. `POST /{id}/send` **Responses** - `200` — Offer sent successfully - `400` — Bad request - Offer is not in a sendable state - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - Caller can view this offer but is not allowed to send it - `404` — Not found - Offer does not exist or caller is not allowed to view it - `409` — Offer is still being prepared (credit/upsells); retry once processing completes - `500` — Internal server error Response example, 200: ```json { "success": true, "sentAt": "2024-01-20T12:00:00Z" } ``` Response example, 400 · offerNotPending: ```json { "code": "OFFER_NOT_PENDING", "message": "Offer cannot be sent because it is not in \"pending\" status" } ``` Response example, 400 · offerSendingError: ```json { "code": "OFFER_SENDING_ERROR", "message": "Error sending offer to customer" } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing authentication token" } ``` Response example, 403 · insufficientScope: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `write:offers` scope, which this endpoint requires. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 403 · permissionDenied: ```json { "code": "FORBIDDEN", "message": "User does not have permission to send this offer" } ``` Response example, 404: ```json { "code": "OFFER_NOT_FOUND", "message": "Offer not found" } ``` Response example, 409 · offerProcessing: ```json { "code": "OFFER_PROCESSING", "message": "Offer is still being prepared. Please retry shortly." } ``` Response example, 409 · upsellsGenerating: ```json { "code": "UPSELLS_GENERATING", "message": "Upsell generation for this offer is still in progress. Please retry shortly." } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred" } ``` --- # Orders API Source: https://docs.sibipro.com/api-reference/orders RESTful API for managing orders Version 1.0.0 Base URL: `https://api.sibipro.com/orders` ## Operations - [`POST /{orderId}/return-requests`](/api-reference/orders/operations/create-return-request) — Start a return (Beta). - [`POST /{id}/cancel`](/api-reference/orders/operations/post-id-cancel) — Cancel order. - [`GET /`](/api-reference/orders/operations/list-orders) — List orders. - [`POST /`](/api-reference/orders/operations/post) — Create order. - [`GET /{id}`](/api-reference/orders/operations/get-id) — Get order. - [`GET /{id}/pdf`](/api-reference/orders/operations/get-order-pdf) — Get order PDF. --- # Start a return (Beta) Source: https://docs.sibipro.com/api-reference/orders/operations/create-return-request **Beta** — this endpoint is unstable; its request and response shapes may change. Opens a return request for one or more lines of an order. A `201` means the request was opened — not that any line is approved yet. Every requested line starts `Pending`. **Learning the outcome:** Sibi staff approve or deny each line independently (one request can end with some lines approved and others denied). Learn the result by subscribing to the `order.returnrequest.item-approved` and `order.returnrequest.item-denied` webhook events — see [Order Return Requests events](https://docs.sibipro.com/events/order.return-requests) — or by re-reading the order with `GET /orders/{orderId}`, whose `returnRequests` array carries each line’s current `status`. A line that is not eligible, is not on the order, appears more than once, or exceeds the returnable quantity is rejected with a `400`. The `400` lists every failing line in `details[]` — each carrying its own `code` from the set below — and no return request is created unless all lines pass. | Code | Meaning | | --- | --- | | `RETURN_INVALID_CONDITION` | The `condition` is not one of the accepted values | | `RETURN_INVALID_QUANTITY` | The `quantity` is not a positive whole number | | `RETURN_DUPLICATE_LINE` | The same order line appears more than once in the request | | `RETURN_LINE_NOT_ON_ORDER` | The `sku` does not match any line on the order | | `RETURN_AMBIGUOUS_SKU` | The `sku` matches more than one line on the order, so it cannot identify a single line to return | | `RETURN_ITEM_NOT_ELIGIBLE` | Policy or current state does not allow returning this line — see the line’s `reasonCode` (e.g. `ALREADY_REQUESTED` when a return request already exists for it, `RETURN_WINDOW_EXPIRED`, `ALREADY_RETURNED`) | | `RETURN_QUANTITY_EXCEEDED` | The requested quantity exceeds what remains returnable on the line | `POST /{orderId}/return-requests` **Request body** (`application/json`) - `items` (ReturnRequestItemInput[], required) — The lines to return. At least one; each must reference a distinct order line. Request body example: ```json { "items": [ { "sku": "GDF510PSRSS", "quantity": 1, "condition": "UNOPENED", "requestReason": "Ordered the wrong size" } ] } ``` **Responses** - `201` — The return request was opened. Every line starts Pending. - `400` — Bad request - Invalid input data. See the operation description for the possible error codes. - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - the token was minted for the other environment, is not a Public REST API token, does not carry the scope this operation requires, or targeted the test environment (the Returns API is production-only) - `404` — Not found - no order with the given id is visible to the caller, or its return data could not be resolved - `500` — Internal server error Response example, 201: ```json { "orderId": "SIBI-12345678", "createdAt": "string", "updatedAt": "string", "items": [ { "sku": "GDF510PSRSS", "quantity": 0, "condition": "UNOPENED", "requestReason": "string", "status": "Pending", "denialReason": "string" } ] } ``` Response example, 400 · validationError: ```json { "code": "VALIDATION_ERROR", "message": "Invalid input parameters" } ``` Response example, 400 · itemNotEligible: ```json { "code": "RETURN_ITEM_NOT_ELIGIBLE", "message": "This item is not eligible for return." } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing or invalid authentication token" } ``` Response example, 403 · environmentMismatch: ```json { "code": "TOKEN_ENVIRONMENT_MISMATCH", "message": "A test token was used against the production API. Test tokens only work against the Sibi test environment; use a production token here." } ``` Response example, 403 · restTokenRequired: ```json { "code": "REST_TOKEN_REQUIRED", "message": "This endpoint only accepts Public REST API tokens. Create one at https://developer.sibipro.com." } ``` Response example, 403 · insufficientScope: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `create:returns` scope, which this endpoint requires. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 403 · notAvailableInTest: ```json { "code": "NOT_AVAILABLE_IN_TEST", "message": "The Returns API is not available in the test environment." } ``` Response example, 404: ```json { "code": "ORDER_NOT_FOUND", "message": "Unable to find order with id: SIBI-12345678" } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred" } ``` --- # Get order Source: https://docs.sibipro.com/api-reference/orders/operations/get-id Retrieve an order by its ID. `GET /{id}` **Responses** - `200` — The order was found. - `400` — Bad request - Invalid input data - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - The token is missing the scope this operation requires, or was minted for the other environment - `404` — Not found - No order exists with the given id - `500` — Internal server error Response example, 200: ```json { "id": "SIBI-12345678", "poNumber": "PO-123456", "viewUrl": "https://web.sibipro.com/orders/SIBI-12345678", "createdAt": "2026-08-18T12:00:00Z", "propertyAddress": { "line1": "1630 W Guadalupe Rd", "line2": "Ste 101", "city": "Gilbert", "stateOrProvince": "AZ", "postalCode": "85233", "country": "USA" }, "fulfillmentMethod": "DELIVERY", "requestedFulfillmentDate": "2026-08-20", "estimatedFulfillmentDate": "2026-08-20", "fulfillmentTimeStart": "string", "fulfillmentTimeEnd": "string", "actualFulfillmentDate": "string", "status": "Processed", "statusDetail": "string", "lineItems": [ { "sku": "GDF510PSRSS", "name": "GE Dishwasher", "quantity": 1, "unitOfMeasure": "EA", "unitPriceCents": 54900, "totalPriceCents": 109800, "options": [ { "key": "ppg-paint-color", "value": "PPG1105-3", "name": "Delicate White", "hex": "#F1EEE6" } ] } ], "fees": [ { "name": "Delivery fee", "amountCents": 999 } ], "exceptions": [ { "createdAt": "2026-08-18T12:00:00Z", "sku": "string", "message": "string", "category": "string" } ], "deliveryContact": { "name": "string", "phone": "string", "email": "string" }, "orderingUser": { "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com" }, "images": [ { "url": "string" } ], "confirmationNumbers": [ { "value": "string" } ], "cancellationRequest": { "status": "Pending", "reason": "string", "createdAt": "string", "updatedAt": "string" }, "returnRequests": [ { "createdAt": "string", "updatedAt": "string", "items": [ { "sku": "GDF510PSRSS", "quantity": 0, "condition": "UNOPENED", "requestReason": "string", "status": "Pending", "denialReason": "string" } ] } ] } ``` Response example, 400: ```json { "code": "VALIDATION_ERROR", "message": "Invalid input parameters" } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing or invalid authentication token" } ``` Response example, 403 · environmentMismatch: ```json { "code": "TOKEN_ENVIRONMENT_MISMATCH", "message": "A test token was used against the production API. Test tokens only work against the Sibi test environment; use a production token here." } ``` Response example, 403 · insufficientScope: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `read:orders` and `read:own:orders` scopes, of which this endpoint requires at least one. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 404: ```json { "code": "ORDER_NOT_FOUND", "message": "Unable to find order with id: SIBI-12345678" } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred", "details": [ { "field": "unknown", "error": "Internal server error occurred while processing request" } ] } ``` --- # Get order PDF Source: https://docs.sibipro.com/api-reference/orders/operations/get-order-pdf Renders the order confirmation as a PDF, generated fresh on every request. Always renders the order document — the same content as GET /{id} laid out as a printable confirmation. `GET /{id}/pdf` **Responses** - `200` — The rendered order-confirmation PDF, returned as raw \`application/pdf\` bytes. - `400` — Bad request - Invalid input data - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - The token is missing the scope this operation requires, or was minted for the other environment - `404` — Not found - No order exists with the given id - `500` — Internal server error Response example, 400: ```json { "code": "VALIDATION_ERROR", "message": "Invalid input parameters" } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing or invalid authentication token" } ``` Response example, 403 · environmentMismatch: ```json { "code": "TOKEN_ENVIRONMENT_MISMATCH", "message": "A test token was used against the production API. Test tokens only work against the Sibi test environment; use a production token here." } ``` Response example, 403 · insufficientScope: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `read:orders` and `read:own:orders` scopes, of which this endpoint requires at least one. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 404: ```json { "code": "ORDER_NOT_FOUND", "message": "Unable to find order with id: SIBI-12345678" } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred", "details": [ { "field": "unknown", "error": "Internal server error occurred while processing request" } ] } ``` --- # List orders Source: https://docs.sibipro.com/api-reference/orders/operations/list-orders Lists orders visible to the token, newest first. Requires a Public REST API token carrying either the `read:orders` or the `read:own:orders` scope. A token carrying `read:orders` sees the orders its user can see in Sibi: orders placed under the user’s primary organization, orders on that organization’s properties, and orders the user placed. A token carrying only `read:own:orders` sees the orders its user placed. Filter with `poNumber` to keep only orders whose `poNumber` equals the value exactly. Filter by property address with `line1`, `city`, `stateOrProvince`, and `postalCode` (all four required together; `line2` optional) — the address must match a property exactly, and the list narrows to orders on the matching properties. Page with `first` and `after`. A page may hold fewer than `first` items because rows are filtered after the search; only a `null` `next` ends the list, so keep paging until `next` is `null`. `GET /` **Responses** - `200` — One page of orders. - `400` — Bad request - Invalid query parameters - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - the token was minted for the other environment, is not a Public REST API token, or does not carry either scope this operation accepts - `500` — Internal server error - `503` — Service unavailable. Response example, 200: ```json { "next": "MjU", "items": [ { "id": "SIBI-12345678", "poNumber": "PO-123456", "viewUrl": "https://web.sibipro.com/orders/SIBI-12345678", "createdAt": "2026-08-18T12:00:00Z", "propertyAddress": { "line1": "1630 W Guadalupe Rd", "line2": "Ste 101", "city": "Gilbert", "stateOrProvince": "AZ", "postalCode": "85233", "country": "USA" }, "fulfillmentMethod": "DELIVERY", "requestedFulfillmentDate": "2026-08-20", "estimatedFulfillmentDate": "2026-08-20", "fulfillmentTimeStart": "string", "fulfillmentTimeEnd": "string", "actualFulfillmentDate": "string", "status": "Processed", "statusDetail": "string", "lineItems": [ { "sku": "GDF510PSRSS", "name": "GE Dishwasher", "quantity": 1, "unitOfMeasure": "EA", "unitPriceCents": 54900, "totalPriceCents": 109800, "options": [ { "key": "ppg-paint-color", "value": "PPG1105-3", "name": "Delicate White", "hex": "#F1EEE6" } ] } ], "fees": [ { "name": "Delivery fee", "amountCents": 999 } ], "exceptions": [ { "createdAt": "2026-08-18T12:00:00Z", "sku": "string", "message": "string", "category": "string" } ], "deliveryContact": { "name": "string", "phone": "string", "email": "string" }, "orderingUser": { "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com" }, "images": [ { "url": "string" } ], "confirmationNumbers": [ { "value": "string" } ], "cancellationRequest": { "status": "Pending", "reason": "string", "createdAt": "string", "updatedAt": "string" }, "returnRequests": [ { "createdAt": "string", "updatedAt": "string", "items": [ { "sku": "GDF510PSRSS", "quantity": 0, "condition": "UNOPENED", "requestReason": "string", "status": "Pending", "denialReason": "string" } ] } ] } ] } ``` Response example, 400: ```json { "code": "VALIDATION_ERROR", "message": "Invalid input parameters", "details": [ { "field": "after", "error": "The `after` cursor is invalid." } ] } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing or invalid authentication token" } ``` Response example, 403 · environmentMismatch: ```json { "code": "TOKEN_ENVIRONMENT_MISMATCH", "message": "A test token was used against the production API. Test tokens only work against the Sibi test environment; use a production token here." } ``` Response example, 403 · restTokenRequired: ```json { "code": "REST_TOKEN_REQUIRED", "message": "This endpoint only accepts Public REST API tokens. Create one at https://developer.sibipro.com." } ``` Response example, 403 · insufficientScope: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `read:orders` and `read:own:orders` scopes, of which this endpoint requires at least one. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred" } ``` Response example, 503: ```json { "code": "AUTH_UNAVAILABLE", "message": "Authentication service unavailable, retry shortly" } ``` --- # Create order Source: https://docs.sibipro.com/api-reference/orders/operations/post Places an order for one or more products from a supplier. Sensible defaults are applied for anything not specified: the fulfillment method defaults to standard delivery, the delivery date to the earliest available, the distribution center to the closest one, and quantity to 1 per line item. Validation runs before placement — the supplier, line items, options, fulfillment choices, and payment method are all checked, and the request is rejected with a specific error code when something doesn't hold together. Pass an `idempotencyKey` to make retries safe: resubmitting the same order with the same key within 5 minutes returns the existing order instead of creating a duplicate. This matters on failure: a 5xx response or a timeout does not guarantee the order was not placed, so retry only with the same `idempotencyKey` — a retry without one can create a duplicate order. Validation failures return 400 with one of these codes: `VALIDATION_ERROR`, `INVALID_SUPPLIER`, `PRODUCTS_NOT_FOUND`, `PRODUCTS_DISCONTINUED`, `INVALID_PRODUCT_OPTIONS`, `INVALID_UNIT_OF_MEASURE`, `ADDON_WITH_ID_NOT_AVAILABLE`, `ADDON_WITH_TITLE_NOT_AVAILABLE`, `CONFLICTING_WARRANTY_INPUT`, `WARRANTY_SKU_NOT_AVAILABLE_FOR_PRODUCT`, `NO_AVAILABLE_WARRANTIES_FOR_PRODUCT`, `INVALID_FULFILLMENT_METHOD`, `NO_AVAILABLE_DELIVERY_METHODS`, `NO_AVAILABLE_FULFILLMENT_DATES`, `INVALID_REQUESTED_DELIVERY_DATE`, `NO_AVAILABLE_PAYMENT_METHODS`, `NO_DISTRIBUTION_CENTER_FOUND`, `INVALID_SUBSCRIBERS`, `DELIVERY_ADDRESS_PROVIDED_FOR_PICKUP`, `INVALID_DELIVERY_ADDRESS`. `POST /` **Request body** (`application/json`) - `supplier` (string) — The supplier to order from, identified by its slug. Required unless the deprecated \`seller\` is sent. - `seller` (string) — Deprecated: use \`supplier\` instead. Ignored when \`supplier\` is also sent. - `address` (OrderAddress, required) — The address must correspond to a valid property in the system. If the address is not valid, the request fails with an error. - `lineItems` (OrderLineItemInput[], required) — The products to order. At least one line item must be specified, and at most 100. - `contactInfo` (OrderContactInfo, required) — Contact information for the customer receiving the order. - `fulfillmentMethodId` (string) — Fulfillment method id for the order. If not provided, defaults to standard delivery. - `fulfillmentMethodType` (string) — Fulfillment method type for the order. Defaults to 'DELIVERY' when both are available. - `deliveryAddress` (object) - `shipToOfficePropertyId` (string) — Removed. Use \`deliveryAddress\`. Sending it fails with a 400. - `requestedDeliveryDate` (string) — The date the customer wants the order delivered. If not provided, defaults to the earliest available. If the provided date is not available, the request fails with an error. - `poNumber` (string) — A reference number of the caller's choosing. It does not need to be a number. - `specialInstructions` (string) — Free-form instructions for fulfillment. - `distributionCenterId` (string) — If omitted the order is placed in the closest distribution center. - `paymentMethodId` (string, required) — The payment method to charge. Must be one of the available payment methods for this caller. - `idempotencyKey` (string) — A unique identifier for the order. If the same order is submitted multiple times within 5 minutes with the same idempotency key, the API returns the existing order and does not create a new one. - `subscribers` (object[]) — An optional list of subscribers to receive updates about the order in addition to the user account that placed the order. Pass an empty list to opt out of status notifications. - `warrantyOrderPaymentMethodId` (string) — If provided, this payment method is used for the warranty sub-order instead of the parent order's \`paymentMethodId\`. Must be one of the warranty-order payment methods available to this caller. Request body example: ```json { "supplier": "ge", "seller": "ge", "address": { "line1": "1630 W Guadalupe Rd", "line2": "Ste 101", "city": "Gilbert", "stateOrProvince": "AZ", "postalCode": "85233", "country": "USA" }, "lineItems": [ { "sku": "GDF510PSRSS", "quantity": 1, "unitOfMeasure": "Each", "options": [ { "key": "ppg-paint-color", "value": "PPG1105-3" } ], "addonIds": [ "string" ], "addonTitles": [ "string" ], "warrantySku": "string", "applyWarrantyCoverage": true } ], "contactInfo": { "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", "phone": "1234567890" }, "fulfillmentMethodId": "sibi-sibi-default-delivery", "fulfillmentMethodType": "DELIVERY", "deliveryAddress": { "line1": "1630 W Guadalupe Rd", "line2": "Ste 101", "city": "Gilbert", "stateOrProvince": "AZ", "postalCode": "85233", "country": "USA" }, "shipToOfficePropertyId": "string", "requestedDeliveryDate": "2026-09-01", "poNumber": "PO-123456", "specialInstructions": "The lock code is 1234", "distributionCenterId": "string", "paymentMethodId": "MANUFACTURER_CREDIT", "idempotencyKey": "string", "subscribers": [ { "email": "updates@example.com" } ], "warrantyOrderPaymentMethodId": "string" } ``` **Responses** - `201` — The order was created. - `400` — Bad request - Invalid input data. See the operation description for the possible error codes. - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - the token was minted for the other environment, is not a Public REST API token, or does not carry the scope this operation requires - `500` — Internal server error Response example, 201: ```json { "id": "SIBI-12345678", "orderUrl": "https://web.sibipro.com/orders/SIBI-12345678", "warrantyOrderId": "string", "warrantyOrderUrl": "string" } ``` Response example, 400 · validationError: ```json { "code": "VALIDATION_ERROR", "message": "Invalid input parameters" } ``` Response example, 400 · invalidSupplier: ```json { "code": "INVALID_SUPPLIER", "message": "Unknown supplier \"acme\"" } ``` Response example, 400 · productsNotFound: ```json { "code": "PRODUCTS_NOT_FOUND", "message": "The following products were not found: not-a-real-sku" } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing or invalid authentication token" } ``` Response example, 403 · environmentMismatch: ```json { "code": "TOKEN_ENVIRONMENT_MISMATCH", "message": "A test token was used against the production API. Test tokens only work against the Sibi test environment; use a production token here." } ``` Response example, 403 · restTokenRequired: ```json { "code": "REST_TOKEN_REQUIRED", "message": "This endpoint only accepts Public REST API tokens. Create one at https://developer.sibipro.com." } ``` Response example, 403 · insufficientScope: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `create:orders` scope, which this endpoint requires. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred" } ``` --- # Cancel order Source: https://docs.sibipro.com/api-reference/orders/operations/post-id-cancel Requests cancellation of an order. A 201 response means the cancellation request was received — not necessarily that the order is cancelled yet. Check the `cancellationStatus` in the response: - orders that can be cancelled immediately (for example, those not yet dispatched) come back `canceled` right away - others come back `pending` and are reviewed asynchronously before being approved or denied For requests that return `pending`, listen for the `order.cancellationrequest.created` and `order.cancellationrequest.updated` events to learn the outcome — see [Order Cancellation Requests events](https://docs.sibipro.com/events/order.cancellation-requests). `POST /{id}/cancel` **Request body** (`application/json`) - `reason` (string, required) — Reason for the cancellation Request body example: ```json { "reason": "Customer requested a cancellation" } ``` **Responses** - `201` — Cancellation requested. The response reflects the current \`cancellationStatus\`: usually \`pending\` (queued for asynchronous review), but already \`canceled\` for orders that are cancelled immediately. - `400` — Bad request - Invalid input data - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - the token was minted for the other environment, is not a Public REST API token, or does not carry the scope this operation requires - `500` — Internal server error Response example, 201: ```json { "cancellationStatus": "pending", "cancellationReason": "Customer requested a cancellation", "requestedAt": "2024-01-20T12:00:00Z" } ``` Response example, 400: ```json { "code": "VALIDATION_ERROR", "message": "Invalid input parameters" } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing or invalid authentication token" } ``` Response example, 403 · environmentMismatch: ```json { "code": "TOKEN_ENVIRONMENT_MISMATCH", "message": "A test token was used against the production API. Test tokens only work against the Sibi test environment; use a production token here." } ``` Response example, 403 · restTokenRequired: ```json { "code": "REST_TOKEN_REQUIRED", "message": "This endpoint only accepts Public REST API tokens. Create one at https://developer.sibipro.com." } ``` Response example, 403 · insufficientScope: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `cancel:orders` scope, which this endpoint requires. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred", "details": [ { "field": "unknown", "error": "Internal server error occurred while processing request" } ] } ``` --- # Products API Source: https://docs.sibipro.com/api-reference/products RESTful API for searching the product catalog and retrieving product details with available add-ons Version 1.0.0 Base URL: `https://api.sibipro.com/products` ## Operations - [`GET /{sku}`](/api-reference/products/operations/get-sku) — Get product details with available add-ons (deprecated). Deprecated. - [`GET /`](/api-reference/products/operations/get) — Search the product catalog. --- # Product Categories API Source: https://docs.sibipro.com/api-reference/products/categories RESTful API for the product categories Sibi organizes its catalog by. Version 1.0.0 Base URL: `https://api.sibipro.com/product-categories` ## Operations - [`GET /`](/api-reference/products/categories/operations/list-product-categories) — List product categories. --- # List product categories Source: https://docs.sibipro.com/api-reference/products/categories/operations/list-product-categories A page of the product categories Sibi sells into, each carrying the suppliers that offer products in it, ordered alphabetically. Page by passing the previous response’s `next` back as `after`; `next` is null once a page comes back short. `GET /` **Responses** - `200` — Product categories the caller is authorized to view - `400` — A query parameter this operation does not accept (UNKNOWN\_QUERY\_PARAMETER), invalid input parameters (VALIDATION\_ERROR), or \`after\` is not a cursor this endpoint issued (INVALID\_CURSOR) - `401` — The Authorization header is missing, or the bearer token could not be resolved (invalid, expired, or revoked) - `403` — The token is not a Public REST API token (REST\_TOKEN\_REQUIRED), it is missing the scope this operation requires (INSUFFICIENT\_SCOPE), or it was minted for the other environment (TOKEN\_ENVIRONMENT\_MISMATCH) - `500` — Internal server error Response example, 200: ```json { "items": [ { "name": "string", "suppliers": [ "ge", "msi" ] } ], "next": "string" } ``` --- # Products Guide Source: https://docs.sibipro.com/api-reference/products/guide The Products API allows you to search the product catalog and retrieve product information including pricing and available add-ons, tailored to a specific delivery address. This is useful for building product search and detail pages, previewing add-on options, or validating product availability before creating an offer. ## Benefits - **Search:** Find products by free-text term, supplier, category, and physical dimensions - **Discovery:** Look up any product by SKU (pass it as `searchTerm`) and see its current availability and pricing - **Add-Ons:** Retrieve grouped add-on products and included parts available for a given address - **Address-Aware:** Results reflect availability and pricing based on the customer's delivery location ## Core Concepts **Product** A product identified by SKU with a title and price **Add-On** A named collection of related add-on products (e.g., Install, Disconnect) **Add-On Product** An individual add-on item with its own SKU, category, and price **Recommended Part** A related product which may not be included in an add-on group (e.g. Laundry Storage Pedestal) ## Looking up a single product by SKU `GET /products/{sku}` is **deprecated**. It keeps working for now, and every successful response carries a `Deprecation: true` header, but new integrations should use the search endpoint instead: 1. Call `GET /products?searchTerm={sku}`, and add `supplier` when you know which supplier carries the SKU. `GET /product-suppliers` lists the `supplier` values your token can search; any other value returns `400 INVALID_SUPPLIER`. 2. Send the same address query parameters (`line1`, `city`, `stateOrProvince`, `postalCode`) to include pricing, add-ons, recommended parts, warranties, and availability. 3. The response is a page of matches. When you want exactly one product, select the item whose `sku` equals the SKU you searched for. An empty `items` array means the SKU was not found. Everything `GET /products/{sku}` returns is available on the search item — `priceCents`, `addOns`, and `recommendedParts` — alongside `availability`, `warranties`, `dimensions`, and `availableFulfillmentMethods`, which the deprecated endpoint never returned. ## Including fulfillment methods `availableFulfillmentMethods` is empty unless you set `includeAvailableFulfillmentMethods=true` and send an address. > **Warning** > > Resolving fulfillment methods is the slowest part of a search, and the time grows with the number of matching > products. On a broad search term this can exceed the request timeout and return a `500`. Our recommended > pattern for searching the product catalog is to search with the flag off first, then re-run the search with > the flag on for the specific SKUs you need. ## Authentication `GET /products` (search) requires a Public REST API token that carries the `read:products` scope. Create the token in the [developer dashboard](https://developer.sibipro.com) and grant it that scope, then send it as `Authorization: Bearer `. A request with a token that lacks the scope receives a `403` with code `INSUFFICIENT_SCOPE`; a token issued for the GraphQL API receives a `403` with code `REST_TOKEN_REQUIRED`. `GET /products/{sku}` accepts the same Public REST API token, applies the same `read:products` scope check, and refuses a GraphQL token with the same `403 REST_TOKEN_REQUIRED`. ## Next Steps 1. **Review Documentation** Read through API reference and authentication requirements 2. **Development** Try searching for a product by SKU and reading its add-ons 3. **Production** Go live with your integration ## Endpoints **[Products endpoints](/api-reference/products)** Every endpoint with parameters, response schemas, and code samples. --- # Search the product catalog Source: https://docs.sibipro.com/api-reference/products/operations/get Searches published products by free-text term, supplier, category, and physical dimensions. Returns a page of product summaries; supply an address to include pricing, availability (with the per-distribution-center breakdown), recommended parts, add-ons, and warranties, and set `includeAvailableFulfillmentMethods` to add fulfillment methods. Warning: resolving fulfillment methods is slow and grows with the number of matching products, so on a broad search term the request can time out and return a 500. Narrow the search to specific SKUs before turning the flag on. `after` is an opaque cursor from a previous response; do not construct one by hand. Requires a Public REST API token that carries the `read:products` scope. Create one in the SIBI developer dashboard (developer.sibipro.com) and grant it that scope; tokens issued for the GraphQL API are refused. `GET /` **Responses** - `200` — Search results retrieved successfully - `400` — Bad request - a query parameter this operation does not accept (UNKNOWN\_QUERY\_PARAMETER), or invalid input data - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - the token was minted for the other environment, is not a Public REST API token, or does not carry the scope this operation requires - `500` — Internal server error - `503` — Service unavailable - the token-exchange service could not be reached (AUTH\_UNAVAILABLE) or supplier visibility could not be resolved (SUPPLIER\_VALIDATION\_UNAVAILABLE); retry the request - `504` — The request timed out Response example, 200: ```json { "items": [ { "sku": "string", "supplier": "ge", "name": "string", "shortDescription": "string", "description": "string", "imageUrls": [ "string" ], "viewUrl": "https://web.sibipro.com/properties/aB3dE5fG7hJ9kL1mN2pQr/shop/product/sibi-carrier-ZP31LXE-PFV-800", "category": "string", "subcategories": [ "string" ], "attributes": [ { "name": "sheen", "value": "Satin" } ], "baseUnitOfMeasure": "Each", "unitsOfMeasure": [ { "unitOfMeasure": "Box", "quantityPerBaseUnit": 23.77 } ], "options": [ { "key": "ppg-paint-color", "value": "PPG1025-3", "name": "Whiskers", "hex": "#C9C7BE" } ], "dimensions": { "width": 0, "widthUnit": "in", "height": 0, "heightUnit": "in", "depth": 0, "depthUnit": "in", "length": 0, "lengthUnit": "in" }, "availability": { "status": "IN_STOCK", "quantity": 0, "distributionCenters": [ { "status": "IN_STOCK", "quantity": 0, "distributionCenter": { "id": "ge-dc-phoenix", "name": "GE Appliances Phoenix", "storeNumber": "string", "phone": "6233885100", "imageUrl": "string", "latitude": 0, "longitude": 0, "address": { "line1": "string", "line2": "string", "city": "string", "stateOrProvince": "string", "postalCode": "string" } } } ] }, "priceCents": 0, "msrpPriceCents": 0, "recommendedParts": [ { "sku": "M236", "name": "Supply Gas Range Flex", "category": "Parts", "priceCents": 0 } ], "addOns": [ { "id": "install", "name": "Install", "priceCents": 0, "products": [ { "sku": "M001", "name": "Basic Install", "category": "Install & Supply Services", "priceCents": 0 } ] } ], "warranties": [ { "sku": "W5YR-APPL", "name": "5 Year Extended Warranty", "description": "Covers parts and labor for 5 years", "priceCents": 0 } ], "availableFulfillmentMethods": [ { "id": "ge-standard-delivery", "name": "Standard Delivery", "description": "string", "type": "DELIVERY", "estimatedFulfillmentDate": "2026-09-02", "distributionCenter": { "id": "ge-dc-phoenix", "name": "GE Appliances Phoenix", "storeNumber": "string", "phone": "6233885100", "imageUrl": "string", "latitude": 0, "longitude": 0, "address": { "line1": "string", "line2": "string", "city": "string", "stateOrProvince": "string", "postalCode": "string" } }, "distributionCenters": [ { "estimatedFulfillmentDate": "2026-09-02", "distributionCenter": { "id": "ge-dc-phoenix", "name": "GE Appliances Phoenix", "storeNumber": "string", "phone": "6233885100", "imageUrl": "string", "latitude": 0, "longitude": 0, "address": { "line1": "string", "line2": "string", "city": "string", "stateOrProvince": "string", "postalCode": "string" } } } ] } ] } ], "next": "string" } ``` Response example, 400 · invalidCursor: ```json { "code": "INVALID_CURSOR", "message": "The `after` cursor is invalid or has expired." } ``` Response example, 400 · invalidDimensionRange: ```json { "code": "INVALID_DIMENSION_RANGE", "message": "minWidth (40) is greater than maxWidth (26) — no product can satisfy this range." } ``` Response example, 400 · addressRequired: ```json { "code": "ADDRESS_REQUIRED", "message": "An address is required when onlyInStock is true." } ``` Response example, 400 · invalidSupplier: ```json { "code": "INVALID_SUPPLIER", "message": "Unknown supplier \"Samsung\"" } ``` Response example, 400 · unknownQueryParameter: ```json { "code": "UNKNOWN_QUERY_PARAMETER", "message": "Unknown query parameter: `catefory`. See the operation's documented query parameters.", "details": [ { "field": "catefory", "error": "Unknown query parameter" } ] } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing authentication token" } ``` Response example, 403 · environmentMismatch: ```json { "code": "TOKEN_ENVIRONMENT_MISMATCH", "message": "A test token was used against the production API. Test tokens only work against the Sibi test environment; use a production token here." } ``` Response example, 403 · restTokenRequired: ```json { "code": "REST_TOKEN_REQUIRED", "message": "This endpoint only accepts Public REST API tokens. Create one at https://developer.sibipro.com." } ``` Response example, 403 · insufficientScope: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `read:products` scope, which this endpoint requires. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred" } ``` Response example, 503 · authUnavailable: ```json { "code": "AUTH_UNAVAILABLE", "message": "Authentication service unavailable, retry shortly" } ``` Response example, 503 · supplierValidationUnavailable: ```json { "code": "SUPPLIER_VALIDATION_UNAVAILABLE", "message": "Supplier visibility could not be determined. Retry the request." } ``` Response example, 504: ```json { "code": "GATEWAY_TIMEOUT", "message": "The request timed out. Try narrowing the request, for example with a smaller 'first', or try setting includeAvailableFulfillmentMethods to false to find a target sku first, before searching for its fulfillment, which is known to be slow.", "requestId": "0dd768c6-ee8b-4665-adb4-d66fa0a1a6a0" } ``` --- # Get product details with available add-ons (deprecated) Source: https://docs.sibipro.com/api-reference/products/operations/get-sku **Deprecated.** Use `GET /products?searchTerm={sku}` instead: pass the SKU as `searchTerm`, add `supplier` when you know it, and supply the same address query parameters to include pricing and add-ons. The search returns a page of matches, so when you want exactly one product, select the item whose `sku` equals the SKU you searched for and treat an empty `items` array as not found. Every field of this response is available on the search item (`priceCents`, `addOns`, `recommendedParts`), alongside availability, warranties, dimensions, and fulfillment methods that this endpoint never returned. Successful responses from this endpoint carry a `Deprecation: true` header. Returns product details including available add-ons grouped by aggregate and related products grouped by product group. `GET /{sku}` **Deprecated.** **Responses** - `200` — Product details retrieved successfully - `400` — Bad request - Invalid input data - `401` — Unauthorized - Missing or invalid authentication - `403` — Forbidden - the token was minted for the other environment, is not a Public REST API token, or does not carry the scope this operation requires - `404` — Product not found - `500` — Internal server error - `503` — Service unavailable - the token-exchange service could not be reached; retry the request - `504` — The request timed out Response example, 200: ```json { "sku": "string", "title": "string", "name": "string", "description": "string", "shortDescription": "string", "imageUrls": [ "string" ], "priceCents": 0, "addOns": [ { "id": "123", "title": "Install", "name": "Install", "priceCents": 10000, "products": [ { "sku": "123", "title": "Install Appliance", "name": "Install Appliance", "category": "Install & Supply Services", "priceCents": 6000 }, { "sku": "124", "title": "Supply Washer Braided Line", "name": "Supply Washer Braided Line", "category": "Install & Supply Services", "priceCents": 4000 } ], "includedPartProducts": [ { "sku": "125", "title": "Washer Inlet Fill Hose", "name": "Washer Inlet Fill Hose", "category": "Parts", "priceCents": 1000 } ] } ], "recommendedParts": [ { "sku": "126", "title": "Washer Inlet Fill Hose", "name": "Washer Inlet Fill Hose", "category": "Parts", "priceCents": 1000 } ], "warnings": [ "No address provided. To include available add-ons and fulfillment/distribution information, please provide an address." ] } ``` Response example, 400 · validationError: ```json { "code": "VALIDATION_ERROR", "message": "Invalid input parameters", "details": [ { "field": "customer.email", "error": "Invalid email" }, { "field": "address.postalCode", "error": "Invalid" } ] } ``` Response example, 400 · invalidAddress: ```json { "code": "ADDRESS_PROCESSING_ERROR", "message": "The provided address is invalid or could not be found" } ``` Response example, 401: ```json { "code": "UNAUTHORIZED", "message": "Missing authentication token" } ``` Response example, 403 · environmentMismatch: ```json { "code": "TOKEN_ENVIRONMENT_MISMATCH", "message": "A test token was used against the production API. Test tokens only work against the Sibi test environment; use a production token here." } ``` Response example, 403 · restTokenRequired: ```json { "code": "REST_TOKEN_REQUIRED", "message": "This endpoint only accepts Public REST API tokens. Create one at https://developer.sibipro.com." } ``` Response example, 403 · insufficientScope: ```json { "code": "INSUFFICIENT_SCOPE", "message": "The presented token is missing the `read:products` scope, which this endpoint requires. Create a token with the scopes you need at https://developer.sibipro.com." } ``` Response example, 500: ```json { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred" } ``` Response example, 503: ```json { "code": "AUTH_UNAVAILABLE", "message": "Authentication service unavailable, retry shortly" } ``` Response example, 504: ```json { "code": "GATEWAY_TIMEOUT", "message": "The request timed out. Try narrowing the request, for example with a smaller 'first', or try setting includeAvailableFulfillmentMethods to false to find a target sku first, before searching for its fulfillment, which is known to be slow.", "requestId": "0dd768c6-ee8b-4665-adb4-d66fa0a1a6a0" } ``` --- # Product Suppliers API Source: https://docs.sibipro.com/api-reference/products/suppliers RESTful API for the suppliers whose products you can search. Version 1.0.0 Base URL: `https://api.sibipro.com/product-suppliers` ## Operations - [`GET /`](/api-reference/products/suppliers/operations/list-product-suppliers) — List product suppliers. --- # List product suppliers Source: https://docs.sibipro.com/api-reference/products/suppliers/operations/list-product-suppliers A page of the suppliers whose products the caller may search, ordered by `supplier`. Each `supplier` is a value `GET /products` accepts as `supplier`; a supplier missing from this list is refused there with `INVALID_SUPPLIER`. The list depends on the suppliers your organization has access to. Page by passing the previous response’s `next` back as `after`; `next` is null on the last page. `GET /` **Responses** - `200` — Suppliers the caller may search - `400` — A query parameter this operation does not accept (UNKNOWN\_QUERY\_PARAMETER), invalid input parameters (VALIDATION\_ERROR), or \`after\` is not a cursor this endpoint issued (INVALID\_CURSOR) - `401` — The Authorization header is missing, or the bearer token could not be resolved (invalid, expired, or revoked) - `403` — The token is not a Public REST API token (REST\_TOKEN\_REQUIRED), it is missing the scope this operation requires (INSUFFICIENT\_SCOPE), or it was minted for the other environment (TOKEN\_ENVIRONMENT\_MISMATCH) - `500` — Internal server error - `503` — The token-exchange service could not be reached (AUTH\_UNAVAILABLE), or the suppliers available to you could not be determined (SUPPLIERS\_UNAVAILABLE); retry the request Response example, 200: ```json { "items": [ { "supplier": "ge", "name": "GE Appliances" } ], "next": "string" } ``` --- # Asset Data Source: https://docs.sibipro.com/events/assets ## `id` The Sibi assigned identifier. Uniquely identifies this asset. Its format depends on the [webhook version](/events/receive-events#webhook-versions): - Version `2` and later: prefixed with `as_`, for example `as_TOwfjdD27dcgfLgwau4HG`. This is the same id the [Assets REST API](/api-reference/assets/guide) returns, so it can be passed to `GET /assets/{id}` as is. - Version `1`: bare, for example `TOwfjdD27dcgfLgwau4HG`. `GET /assets/{id}` accepts this form too. ## `createdAt` ISO 8601 timestamp of when the asset was created. ## `manufacturer` A slug identifying which shop the product was purchased from. Is not always the actual product manufacturer. For example, we have a specific model dishwasher that is available on both the `ge` & `thehomedepot` shop. The `manufacturer` field would have a value of `thehomedepot` if purchased through that shop. ## `viewUrl` A URL to view the asset in the Sibi Web UI. ## `name` The human readable name of the product. ## `sku` The manufacturer defined identifier for this product. The combination of manufacturer & sku can uniquely identify the product within Sibi. ## `serialNumber` The `serialNumber` is defined by the manufacturer and is sometimes provided at invoice time. We don't always have this value available. Returns `null` when we don't have it available. ## `category` The broad category this product falls into. ## `subcategories` Array of strings of all the specific subcategories this product falls into. May be empty and may also be 1:1 with `category` ## `returned` Is `true` if this asset has been returned. Is currently based on invoice data. ## `poNumber` The external purchase order number provided with the invoice for which this asset was created. Is defined by the user when placing the order. Is `null` when not available. ## `orderId` The unique identifier for the order associated with this asset within Sibi. ## `propertyAddress` The property address associated with the order for this asset. Broken down into separate string fields `line1`, `line2`, `city`, `stateOrProvince`, `postalCode`. If the address doesn't have a `line2`, it will return a value of `null`. ## `property.externalId` A user defined identifier for this property. Can be configured in the Sibi Web UI by using the form field called "Property ID" on the property detail place. Returns `null` if not defined. ## `dimensions` An object containing the product dimensions. Each dimension has a value and a unit field: - `length` - The numerical length value - `lengthUnit` - The unit of measurement for length (e.g., "inch") - `width` - The numerical width value - `widthUnit` - The unit of measurement for width (e.g., "inch") - `height` - The numerical height value - `heightUnit` - The unit of measurement for height (e.g., "inch") - `depth` - The numerical depth value - `depthUnit` - The unit of measurement for depth (e.g., "inch") If a particular dimension value is not available, that field will be omitted from the dimensions object. ## `warrantyCoverages` Array of the warranty coverage periods currently known for this asset. Always present on `asset.created` events, and empty when no coverage is known when the asset is created. Present on `asset.updated` events triggered by a warranty coverage change, such as a warranty registration. Omitted entirely on `asset.updated` events triggered by other asset changes. Each entry is a contiguous date range with a constant set of coverage types: - `description` - Human-readable description of the coverage that applies during this range, e.g. `"GE manufacturer warranty covering parts and labor for defects in materials or workmanship."`. May be `null` if no description is available for this coverage. - `startDate` - ISO 8601 timestamp of when this coverage range begins. - `endDate` - ISO 8601 timestamp of when this coverage range ends. ### Example payload (version `2`) ```json { "topic": "asset.created", "data": { "id": "as_TOwfjdD27dcgfLgwau4HG", "createdAt": "2025-03-26T15:04:05.000Z", "manufacturer": "ge", "viewUrl": "https://web.sibipro.com/properties/123456/asset/TOwfjdD27dcgfLgwau4HG", "name": "GE Profile 30", "sku": "GRF400SVSS", "serialNumber": "DA123456", "category": "Free Standing Ranges", "subcategories": ["Smooth Top Ranges"], "orderId": "ORD-12345XYZ", "poNumber": "customer defined po number", "returned": false, "dimensions": { "length": 30, "lengthUnit": "inch", "width": 30, "widthUnit": "inch", "height": 36.25, "heightUnit": "inch", "depth": 28.5, "depthUnit": "inch" }, "propertyAddress": { "line1": "12345 E Main St", "line2": "Unit 3", "city": "Anytown", "stateOrProvince": "AZ", "postalCode": "85233" }, "property": { "externalId": "123456" }, "warrantyCoverages": [ { "description": "GE manufacturer warranty covering parts and labor for defects in materials or workmanship.", "startDate": "2025-03-26T00:00:00.000Z", "endDate": "2035-03-26T00:00:00.000Z" } ] } } ``` ### Example `asset.updated` payload with `warrantyCoverages` (version `2`) ```json { "topic": "asset.updated", "data": { "id": "as_TOwfjdD27dcgfLgwau4HG", "createdAt": "2025-03-26T15:04:05.000Z", "manufacturer": "ge", "viewUrl": "https://web.sibipro.com/properties/123456/asset/TOwfjdD27dcgfLgwau4HG", "name": "GE Profile 30", "sku": "GRF400SVSS", "serialNumber": "DA123456", "category": "Free Standing Ranges", "subcategories": ["Smooth Top Ranges"], "orderId": "ORD-12345XYZ", "poNumber": "customer defined po number", "returned": false, "dimensions": { "length": 30, "lengthUnit": "inch", "width": 30, "widthUnit": "inch", "height": 36.25, "heightUnit": "inch", "depth": 28.5, "depthUnit": "inch" }, "propertyAddress": { "line1": "12345 E Main St", "line2": "Unit 3", "city": "Anytown", "stateOrProvince": "AZ", "postalCode": "85233" }, "property": { "externalId": "123456" }, "warrantyCoverages": [ { "description": "GE manufacturer warranty covering parts and labor for defects in materials or workmanship.", "startDate": "2025-03-26T00:00:00.000Z", "endDate": "2035-03-26T00:00:00.000Z" } ] } } ``` --- # Invoice Data Source: https://docs.sibipro.com/events/invoices ## `invoiceNumber` The unique identifier for the invoice, assigned by the distributor. ## `createdAt` The date the invoice was generated, in ISO 8601 format. ## `dueDate` Only present on [webhook version](/events/receive-events#webhook-versions) `2` and later. The date the invoice payment is due, in ISO 8601 format. Is `null` when the due date is not known. ## `orderId` The unique identifier of the order in Sibi that is associated with this invoice. ## `poNumber` The external purchase order number provided for this invoice. Is defined by the user when placing the order. Is `null` when not available. ## `propertyAddress` The property address associated with the invoice. Broken down into separate string fields `line1`, `line2`, `city`, `stateOrProvince`, `postalCode`. If the address doesn't have a `line2`, it will return a value of `null`. ## `taxCents` The tax amount applied to this invoice, represented in cents. ## `totalCents` The total amount of the invoice, represented in cents. ## `lineItems` A list of items included in the invoice. ## `lineItems.sku` The stock-keeping unit (SKU) identifier for the item. ## `lineItems.name` Human readable name of the item. Is `null` when not available. ## `lineItems.quantity` The number of units purchased for this item. ## `lineItems.unitOfMeasure` The unit of measurement for this item (e.g., EA for each). ## `lineItems.unitPriceCents` The price per unit of the item, represented in cents. ## `lineItems.totalPriceCents` The total price for the line item, accounting for the quantity and unit price, represented in cents. ## `lineItems.serialNumber` The serial number of the item when available. Will be `null` when not available. ## `fees` A list of fees applied to the order associated with the invoice. Empty when there are none, or for invoices issued before fees were captured. ## `fees.name` Human readable name of the fee. ## `fees.amountCents` The amount of the fee, represented in cents. ## `discounts` A list of discounts applied to the order associated with the invoice. Empty when there are none, or for invoices issued before discounts were captured. ## `discounts.name` Human readable name of the discount. ## `discounts.amountCents` The amount of the discount, expressed as a positive magnitude and represented in cents. ### Example payload (version `2`) ```json { "topic": "invoice.created", "data": { "invoiceNumber": "987654321", "createdAt": "2025-03-10T00:00:00.000Z", "dueDate": "2025-04-09T00:00:00.000Z", "orderId": "ORD-12345678", "poNumber": "12345", "propertyAddress": { "line1": "12345 E Main St", "line2": "Unit 3", "city": "Anytown", "stateOrProvince": "AZ", "postalCode": "85233" }, "taxCents": 0, "totalCents": 58700, "fees": [ { "name": "Delivery Fee", "amountCents": 500 } ], "discounts": [ { "name": "Loyalty Discount", "amountCents": 250 } ], "lineItems": [ { "name": "4.0 cf Top Load Washer", "sku": "HTW265ASWWW", "quantity": 1, "unitOfMeasure": "EA", "unitPriceCents": 48500, "totalPriceCents": 48500, "serialNumber": "1234567890" }, { "name": "Install Washer", "sku": "M302", "quantity": 1, "unitOfMeasure": "EA", "unitPriceCents": 3000, "totalPriceCents": 3000, "serialNumber": null }, { "name": "Supply Washer Braided Line", "sku": "M314", "quantity": 1, "unitOfMeasure": "EA", "unitPriceCents": 3200, "totalPriceCents": 3200, "serialNumber": null }, { "name": "Disconnect Old Washer", "sku": "M024", "quantity": 1, "unitOfMeasure": "EA", "unitPriceCents": 1000, "totalPriceCents": 1000, "serialNumber": null }, { "name": "Recycle Old Appliance", "sku": "M007", "quantity": 1, "unitOfMeasure": "EA", "unitPriceCents": 3000, "totalPriceCents": 3000, "serialNumber": null } ] } } ``` --- # Offer Data Source: https://docs.sibipro.com/events/offers `offer.created` is triggered when an offer is created. `offer.updated` is triggered when an offer is updated, including when the offer status changes, offerings are modified, or acceptance occurs. `offer.buyout.adjusted` is triggered when the buyout amount is adjusted for an existing offer. ## `id` The unique identifier for the offer. ## `orderIds` The unique identifiers of the associated orders created from an offer decision. Will be omitted/null if no order exists. ## `thirdPartyId` External system identifier for this offer. May be omitted or empty when not available. ## `customerName` The full name of the customer associated with this offer. ## `customerEmail` The email address of the customer associated with this offer. ## `customerPhone` The phone number of the customer associated with this offer. ## `fullAddress` The complete formatted address for the offer property. ## `line1` The first line of the property address (street address). ## `line2` The second line of the property address (unit, suite, etc.). May be omitted or empty when not applicable. ## `city` The city of the property address. ## `stateOrProvince` The state or province of the property address. ## `postalCode` The postal or ZIP code of the property address. ## `status` The current status of the offer. ### Expected Offer Statuses The following values are expected statuses of an offer. All offer statuses have a `string` type. - `pending` - The offer has been created but not yet sent to the customer. - `awaiting_customer` - The offer has been sent to the customer and is awaiting their response. - `order_placed` - The customer has accepted the offer and an order has been placed. - `buyout_accepted` - The customer has accepted a buyout offer. - `expired` - The offer has expired without customer action. - `canceled` - The offer has been canceled before completion. The offer has been canceled before completion. ## `acceptedByRole` The role of the person who accepted or processed the offer. Common values include "curator" or "customer". Will be omitted/null if the offer has not been accepted. ## `selectedOffering` An array of selected offering objects, each containing the chosen products and any selected addons. This is offering that was chosen by the customer or by the curator on behalf of the customer. If the offer is in a status that is not `Order placed`, this will be omitted/null. ### `selectedOffering.products` Array of product selections within the selected offering. #### `selectedOffering.products.productId` The identifier of the selected product. #### `selectedOffering.products.curatorSelectedAddons` Array of addons included by the curator for this product selection. Each addon object contains `addonId`. #### `selectedOffering.products.customerSelectedAddons` Array of addons explicitly selected by the customer for this product selection. Each addon object contains `addonId`. ## `offerings` An array of offering options presented in this offer. When the offer is initially created and the status is `Pending`, Only the isIncluded product may be present. Upsells are generated asynchronously and may not be present until the offer is updated. ### `offerings.isIncluded` Boolean indicating whether this offering option is included in the selected offer. ### `offerings.products` Array of products that belong to this offering option. #### `offerings.products.productId` The identifier of a product associated with this offering option. #### `offerings.products.curatorSelectedAddons` Array of addons included by the curator for this offering product. Each addon object contains `addonId`. ## `buyoutAmountCents` The amount given to the customer for their buyout option on this offer, represented in cents. ## `creditAmountCents` The amount of credit applied to this offer, represented in cents. May be omitted/null when no credit is applied or when the offer has no upsells. ## `companySpendCents` The amount the company will spend on this offer, represented in cents. ## `customerSpendCents` The amount the customer will spend on this offer, represented in cents. ## `offerPricingBreakdown` Detailed pricing breakdown for the offer checkout, including subtotal, tax, total, discounts, fees, and priced items. Represents the customer's pricing shown at checkout. Will be omitted/null if no offer checkout pricing data is available. ### `offerPricingBreakdown.subtotal` The subtotal amount for the offer checkout, represented in cents. `null` if unavailable. ### `offerPricingBreakdown.tax` The tax amount for the offer checkout, represented in cents. `null` if unavailable. ### `offerPricingBreakdown.total` The total amount for the offer checkout, represented in cents. `null` if unavailable. ### `offerPricingBreakdown.discounts` An array of discount objects applied to the offer checkout. #### `offerPricingBreakdown.discounts.amount` The discount amount, represented in cents. ### `offerPricingBreakdown.fees` An array of fee objects applied to the offer checkout. #### `offerPricingBreakdown.fees.amount` The fee amount, represented in cents. ### `offerPricingBreakdown.pricedItems` An array of items included in the offer checkout pricing. #### `offerPricingBreakdown.pricedItems.id` The unique identifier of the priced item. #### `offerPricingBreakdown.pricedItems.title` The title/name of the priced item. #### `offerPricingBreakdown.pricedItems.purchasePrice` The purchase price of the item, represented in cents. ## `offerSentAt` The timestamp when the offer was sent to the customer in ISO 8601 format. ## Example payload ```json { "topic": "offer.updated", "data": { "id": "test-offer-id", "orderIds": ["test-order-id"], "thirdPartyId": "test-third-party-id", "customerName": "Test Customer", "customerEmail": "test@test.com", "customerPhone": "(123) 456-7890", "fullAddress": "123 Main St, Anytown, CA 12345", "line1": "123 Main St", "line2": "", "city": "Anytown", "stateOrProvince": "CA", "postalCode": "12345", "status": "Order placed", "acceptedByRole": "curator", "selectedOffering": [ { "products": [ { "productId": "test-product-id", "curatorSelectedAddons": [{ "addonId": "addon-1" }], "customerSelectedAddons": [{ "addonId": "addon-2" }] } ] } ], "offerings": [ { "isIncluded": true, "products": [ { "productId": "test-product-id", "curatorSelectedAddons": [{ "addonId": "addon-1" }] } ] }, { "isIncluded": false, "products": [ { "productId": "test-product-id", "curatorSelectedAddons": [] } ] } ], "buyoutAmountCents": 25000, "creditAmountCents": 25000, "companySpendCents": 25000, "customerSpendCents": 11000, "offerPricingBreakdown": { "pricedItems": [ { "id": "test-product-id", "title": "SIBI Microwave", "purchasePrice": 30000 } ], "subtotal": 30000, "tax": 3000, "discounts": [ { "amount": 25000 } ], "fees": [ { "amount": 3000 } ], "total": 11000 }, "offerSentAt": "2025-08-19T00:00:00.000Z" } } ``` --- # Order Cancellation Requests Source: https://docs.sibipro.com/events/order.cancellation-requests ## Cancellation Request Created This event is triggered when an order cancellation request is first created. The event will have a topic of `order.cancellationrequest.created`. When a cancellation request is created, the status will always be `pending`. ## `orderId` The unique identifier for the order. ## `poNumber` Purchase order number associated with this order. Defined by the person that placed the order. Is `null` when not available. ## `status` The current status of the cancellation request. Will be one of: - `Pending` - The cancellation request is awaiting review - `Approved` - The cancellation request was approved and the order has been cancelled - `Denied` - The cancellation request was denied and the order continues processing ## `reason` The reason provided for the cancellation request. ## `createdAt` The timestamp when the cancellation request was created in ISO 8601 format. ## `updatedAt` The timestamp when the cancellation request was last updated in ISO 8601 format. ### Example payload ```json { "topic": "order.cancellationrequest.created", "data": { "orderId": "ORD-12345XYZ", "poNumber": "customer-po-number", "status": "Pending", "reason": "Customer requested cancellation - wrong item ordered", "createdAt": "2025-03-18T15:30:45.123Z", "updatedAt": "2025-03-18T15:30:45.123Z" } } ``` ## Cancellation Request Updated This event is triggered when an order cancellation request status changes. The event will have a topic of `order.cancellationrequest.updated`. This event fires when: - A pending cancellation request is approved (status changes to `Approved`) - A pending cancellation request is denied (status changes to `Denied`) - A cancellation request status changes back to pending (status changes to `Pending`) Note: This event does NOT fire when the cancellation request is initially created with `pending` status. Use `order.cancellationrequest.created` for that. The `.updated` event only fires for subsequent status changes. ### Fields All fields are the same as `order.cancellationrequest.created`. ### `status` For the `.updated` event, status will be one of: - `Pending` - The cancellation request status changed back to pending - `Approved` - The cancellation request was approved and the order has been cancelled - `Denied` - The cancellation request was denied and the order continues processing ### Example payload ```json { "topic": "order.cancellationrequest.updated", "data": { "orderId": "ORD-12345XYZ", "poNumber": "customer-po-number", "status": "Approved", "reason": "Customer requested cancellation - wrong item ordered", "createdAt": "2025-03-18T15:30:45.123Z", "updatedAt": "2025-03-18T16:45:22.456Z" } } ``` --- # Order Exceptions Source: https://docs.sibipro.com/events/order.exceptions ## `createdAt` The timestamp when the order exception was created in ISO 8601 format. ## `orderId` The unique identifier for the order. ## `poNumber` Purchase order number associated with this order. Defined by the person that placed the order. Is `null` when not available. ## `sku` The SKU associated with the exception, if applicable. Note that this may be a distributor SKU that doesn't exist in the SIBI system. Will be `null` when not available or not applicable. ## `message` A description of the exception that occurred. ## `category` The category of the exception. Will always be `null` at the moment. > **Note** > > We previously supported a category of `installation-failed`. However, we did not feel that it accurately identified > when an installation has actually failed. We have temporarily adjusted the event to always have a category of `null`. > Once we feel we can accurately identify when an installation has failed, we will re-introduce the > `installation-failed` category. ### Example payload ```json { "topic": "order.exception.created", "data": { "createdAt": "2025-03-18T15:30:45.123Z", "orderId": "ORD-12345XYZ", "poNumber": "customer-po-number", "sku": "1234567890", "message": "This is an exception message", "category": null } } ``` --- # Order Return Requests Source: https://docs.sibipro.com/events/order.return-requests A return request covers one or more lines from a single order. It opens with a status of pending for every requested line, and Sibi staff then approve or deny each line individually. Because decisions are made per line, a single request can produce multiple `itemApproved` and `itemDenied` events over its lifetime. > **Beta** > > Return request events are in beta and are delivered only to webhooks enrolled in the beta program. Contact Sibi to opt in. ## Return Request Created This event is triggered when a return request is first opened. The event will have a topic of `order.returnrequest.created`. When a request is created, every line on it is pending review. ### `orderId` The identifier of the order the returned lines belong to. ### `items` The lines requested for return. Always contains at least one entry. Each entry has: - `sku` - The product SKU of the line being returned, correlating to the order's `lineItems[].sku`. - `quantity` - The number of units requested for return. Always a positive integer. - `condition` - The condition of the item being returned. One of `UNOPENED`, `OPENED-UNUSED`, `INSTALLED`, or `DAMAGED`. - `requestReason` - The reason provided for returning this line. ### Example payload ```json { "topic": "order.returnrequest.created", "data": { "orderId": "ORD-12345XYZ", "items": [ { "sku": "GDF510PSRSS", "quantity": 2, "condition": "UNOPENED", "requestReason": "Ordered the wrong size" } ] } } ``` ## Return Request Item Approved This event is triggered when a single requested line is approved. The event will have a topic of `order.returnrequest.item-approved`. One event fires per approved line, so a request with several approved lines produces several events. Approval is Sibi staff confirming the line will be taken back. It starts the return; it does not complete it. Sibi support then emails the person who placed the order to coordinate the return with the distributor, so watch for that email — the next steps come from support, not from this event. ### `orderId` The identifier of the order the returned line belongs to. ### `sku` The product SKU of the approved line, correlating to the order's `lineItems[].sku`. ### `quantity` The number of units approved for return. Always a positive integer. ### Example payload ```json { "topic": "order.returnrequest.item-approved", "data": { "orderId": "ORD-12345XYZ", "sku": "GDF510PSRSS", "quantity": 2 } } ``` ## Return Request Item Denied This event is triggered when a single requested line is denied. The event will have a topic of `order.returnrequest.item-denied`. One event fires per denied line, so a request with several denied lines produces several events. ### `orderId` The identifier of the order the returned line belongs to. ### `sku` The product SKU of the denied line, correlating to the order's `lineItems[].sku`. ### `denialReason` The reason the line was denied, as recorded on the decision. ### Example payload ```json { "topic": "order.returnrequest.item-denied", "data": { "orderId": "ORD-12345XYZ", "sku": "GDF510PSRSS", "denialReason": "Item is outside the return window" } } ``` ## Return Request Updated This event is triggered each time a line on the request is decided — approved or denied. The event will have a topic of `order.returnrequest.updated`. Unlike `item-approved` and `item-denied`, which each report a single line's decision, this event carries the full current state of the request: every requested line with its latest status. One decision therefore produces one `item-approved` or `item-denied` event **and** one `updated` event. Use this topic when you want the whole request's state from a single event instead of stitching the per-line events together. This event does not fire when the request is first opened — use `order.returnrequest.created` for that. ### `orderId` The identifier of the order the returned lines belong to. ### `updatedAt` The timestamp of the most recent change to the request, in ISO 8601 format. ### `items` Every line on the request, each carrying its current status. Each entry has: - `sku` - The product SKU of the line being returned, correlating to the order's `lineItems[].sku`. - `quantity` - The number of units requested for return. Always a positive integer. - `condition` - The condition of the item being returned. One of `UNOPENED`, `OPENED-UNUSED`, `INSTALLED`, or `DAMAGED`. - `requestReason` - The reason provided for returning this line. - `status` - The line's current status. One of `Pending`, `Approved`, or `Denied`. - `denialReason` - The reason the line was denied, as recorded on the decision. `null` unless `status` is `Denied`. ### Example payload ```json { "topic": "order.returnrequest.updated", "data": { "orderId": "ORD-12345XYZ", "updatedAt": "2025-03-18T16:45:22.456Z", "items": [ { "sku": "GDF510PSRSS", "quantity": 2, "condition": "UNOPENED", "requestReason": "Ordered the wrong size", "status": "Approved", "denialReason": null }, { "sku": "DW80R9950US", "quantity": 1, "condition": "DAMAGED", "requestReason": "Arrived dented", "status": "Denied", "denialReason": "Item is outside the return window" } ] } } ``` --- # Order Data Source: https://docs.sibipro.com/events/orders - `order.created` is triggered when an order is created. - `order.updated` is triggered when an order is updated, including when order exceptions are added. ## `id` The unique identifier for the order. ## `poNumber` Purchase order number associated with this order. Defined by the person that placed the order. Is `null` when not available. ## `viewUrl` A URL to view the order in the Sibi Web UI. ## `createdAt` The timestamp when the order was created in ISO 8601 format. ## `propertyAddress` The property address associated with this order. Broken down into separate string fields `line1`, `line2`, `city`, `stateOrProvince`, `postalCode`. If the address doesn't have a `line2`, it will return a value of `null`. ## `fulfillmentMethod` How the order will be fulfilled. Will be one of `PICKUP` or `DELIVERY`. ## `requestedFulfillmentDate` The date when the order is requested to be fulfilled in ISO 8601 format. ## `estimatedFulfillmentDate` The estimated fulfillment date for the order in ISO 8601 format. Will return the fulfillment date from the distributor if available, falls back to the `requestedFulfillmentDate`. ## `actualFulfillmentDate` The timestamp when the order was actually fulfilled — when it transitioned into a status of `Delivered` or `Picked_Up` — in ISO 8601 format in UTC. Will be `null` until the order reaches one of those statuses, so it is always `null` on `order.created`. ## `fulfillmentTimeStart` The start of the time window when the order is requested to be fulfilled in ISO 8601 format in UTC. Will be `null` when not available. ## `fulfillmentTimeEnd` The end of the time window when the order is requested to be fulfilled in ISO 8601 format in UTC. Will be `null` when not available. ## `status` The current status of the order. ## `statusDetail` Details about the current order status. Is generally provided as human readable text like "Order confirmation number updated", "Order is on hold", or "Shipped to Delivery Agent". Is not always provided and will be `null` when not available. ### Expected Order Statuses The following values are the expected statuses of an order. All Order statuses have a `string` type. #### `Pending` The Order still requires approval. At this point, an order can be canceled or approved. #### `Approved` The Order was approved. This status is short-lived and quickly transitions to a status of `In_Process` and `Processed`. #### `In_Process` The Order is in the process of being submitted to the partner. This status is short-lived and quickly transitions to a status of `Processed` or `Delayed`. #### `Processed` The Order has been successfully processed. #### `Delayed` The Order has been delayed. Delayed orders are quickly resolved. #### `Confirmed` The Order has been confirmed by the partner. A confirmation number should be present on the order at this point. #### `At_Distribution` The Order is at the distribution center. #### `In_Transit` The Order is in transit to the fulfillment address. #### `Delivered` The Order has been delivered. #### `Ready_For_Pickup` The Order is ready for pickup at the partner distribution center fulfilling the order. #### `Picked_Up` The Order has been picked up from the partner distribution center. #### `Canceled` The Order has been canceled. This can happen either when a pending Order is canceled, or when an Order is canceled after being placed. ## `taxCents` The tax amount for this order, represented in cents. ## `totalCents` The total cost of the order, represented in cents. ## `lineItems` A list of items included in the invoice. ## `lineItems.sku` The stock-keeping unit (SKU) identifier for the item. ## `lineItems.name` The human readable name of the product. ## `lineItems.quantity` The number of units purchased for this item. ## `lineItems.unitOfMeasure` The unit of measurement for this item (e.g., EA for each). ## `lineItems.unitPriceCents` The price per unit of the item, represented in cents. ## `lineItems.totalPriceCents` The total price for the line item, accounting for the quantity and unit price, represented in cents. ## `fees` A list of fees associated with the order. ## `fees.title` > **Deprecated** > > Only present on version `1` events. Removed from version `2` onward. Please use `name` instead. The human readable name of the fee. ## `fees.name` The human readable name of the fee. ## `fees.totalPriceCents` The total price of the fee, represented in cents. ## `exceptions` A list of exceptions that occurred during order processing. May be empty if no exceptions occurred. ## `exceptions.createdAt` The timestamp when the exception occurred in ISO 8601 format. ## `exceptions.sku` The SKU associated with the exception, if applicable. Note that this may be a distributor SKU that doesn't exist in the SIBI system. Will be `null` when not available or not applicable. ## `exceptions.message` A description of the exception that occurred. ## `exceptions.category` The category of the exception. Category will be `null` for now. As we add new categories we will update this documentation. ## `deliveryContact` The delivery agent assigned to the order. Will be `null` when not available. ## `deliveryContact.name` The name of the delivery agent. ## `deliveryContact.phone` The phone number of the delivery agent. Will be `null` when not available. ## `deliveryContact.email` The email address of the delivery agent. Will be `null` when not available. ## `orderingUser` The user who placed the order. Will be `null` when not available. ## `orderingUser.firstName` The first name of the user who placed the order. ## `orderingUser.lastName` The last name of the user who placed the order. ## `orderingUser.email` The email address of the user who placed the order. ## `images` An array of installation images associated with the order. ## `images.url` The URL of the image. ## `manufacturer` The manufacturer / partner on the order, e.g. `"Carrier"`. `null` for legacy orders or when unresolved. ## `distributor` The distributor company on the order, e.g. `"Carrier Enterprises"`. `null` when unresolved. ## `distributor.name` The name of the distributor company. ## `distributionCenter` The distribution center fulfilling the order, e.g. `"Carrier Enterprise(CE) Springfield #3934"`. `null` when unresolved. ## `distributionCenter.name` The name of the distribution center. ## `distributionCenter.address` The address of the distribution center. ## `distributionCenter.address.line1` The first line of the distribution center's address. ## `distributionCenter.address.line2` The second line of the distribution center's address. `null` when not provided. ## `distributionCenter.address.city` The city of the distribution center's address. ## `distributionCenter.address.stateOrProvince` The state or province of the distribution center's address. ## `distributionCenter.address.postalCode` The postal code of the distribution center's address. ## `distributionCenter.phone` The phone number of the distribution center, as the distributor publishes it. `null` when the distributor has not provided one. ## `cancellationRequest` The cancellation request associated with this order, if one exists. This field is omitted when the order has no cancellation request. ## `cancellationRequest.status` The current status of the cancellation request. Will be one of: - `Pending` - The cancellation request is awaiting review - `Approved` - The cancellation request was approved and the order has been cancelled - `Denied` - The cancellation request was denied and the order continues processing ## `cancellationRequest.reason` The reason provided for the cancellation request. ## `cancellationRequest.createdAt` The timestamp when the cancellation request was created in ISO 8601 format. ## `cancellationRequest.updatedAt` The timestamp when the cancellation request was last updated in ISO 8601 format. ## `confirmationNumbers` An array of confirmation numbers objects. Multiple confirmation numbers are usually an indication that the order has been split into multiple shipments. ## `confirmationNumbers.value` The value of the confirmation number. Confirmation numbers are a reference number from a fulfillment partner that enable you to track your order. They are issued when we submit the order to the partner. ### Example payload ```json { "topic": "order.created", "data": { "id": "ORD-12345XYZ", "poNumber": "123456", "viewUrl": "https://web.sibipro.com/orders/ORD-12345XYZ", "createdAt": "2025-03-18T15:30:45.123Z", "propertyAddress": { "line1": "12345 E Main St", "line2": "Unit 3", "city": "Anytown", "stateOrProvince": "AZ", "postalCode": "85233" }, "fulfillmentMethod": "DELIVERY", "requestedFulfillmentDate": "2025-03-22T00:00:00.000Z", "estimatedFulfillmentDate": "2025-03-22T00:00:00.000Z", "fulfillmentTimeStart": "2025-03-22T12:00:00.000Z", "fulfillmentTimeEnd": "2025-03-22T16:00:00.000Z", "actualFulfillmentDate": null, "status": "Processed", "statusDetail": "Order confirmation number updated", "taxCents": 4500, "totalCents": 90500, "fees": [ { "name": "Standard Delivery", "totalPriceCents": 2500 } ], "lineItems": [ { "name": "Ashton 2.0 - Benton Blonde", "sku": "VTRBENBLO7X48-4.4MM-12MIL", "quantity": 879, "unitOfMeasure": "Sq Ft", "unitPriceCents": 139, "totalPriceCents": 122181 } ], "exceptions": [ { "createdAt": "2025-03-18T15:35:22.456Z", "sku": "VTRBENBLO7X48-4.4MM-12MIL", "message": "Product temporarily out of stock at nearest distribution center", "category": "installation-failed" }, { "createdAt": "2025-03-18T15:36:10.789Z", "sku": null, "message": "Delivery address outside of standard service area, additional fees may apply", "category": null } ], "deliveryContact": { "name": "Jay Doe", "phone": "123-456-7890", "email": "jay.doe@example.com" }, "orderingUser": { "firstName": "Jane", "lastName": "Doe", "email": "jane.doe@example.com" }, "confirmationNumbers": [{ "value": "1234567890" }], "images": [ { "url": "https://s3.us-east-2.amazonaws.com/sibi.images/fund/Sibi.png" }, { "url": "https://s3.us-east-2.amazonaws.com/sibi.images/auth/logo.png" } ], "manufacturer": "Carrier", "distributor": { "name": "Carrier Enterprises" }, "distributionCenter": { "name": "Carrier Enterprise(CE) Springfield #3934", "address": { "line1": "456 W Distribution Ave", "line2": null, "city": "Springfield", "stateOrProvince": "AZ", "postalCode": "85234" }, "phone": "(480) 555-0134" }, "cancellationRequest": { "status": "Approved", "reason": "Customer requested cancellation - wrong item ordered", "createdAt": "2025-03-18T15:30:45.123Z", "updatedAt": "2025-03-18T16:45:22.456Z" } } } ``` --- # Receive Events Source: https://docs.sibipro.com/events/receive-events ## Receiving Events via Webhook Register a webhook yourself from the **[SIBI Developer Portal](https://developer.sibipro.com/webhooks)**: select **Register a webhook** and provide - **Endpoint URL** — the https endpoint SIBI will POST deliveries to. - **Topics** — a comma separated list of the topics you want, for example `order.created, order.updated`. Leave it empty to receive every topic. - **Test webhook** — a test webhook receives only events from the [test environment](/rest/test-environment), and a live webhook only live events. This cannot be changed after the webhook is registered. > **Save the signing secret** > > Registering a webhook returns its signing secret, and that is the only time it is shown. Copy it and store it > somewhere safe before leaving the page — if you lose it, the only way to get a working secret again is to delete the > webhook and register a new one. ### Webhook limit An organization can have 5 webhooks at a time, test and live combined. If you need more, [email us](mailto:ben@sibipro.com?subject=Sibi%20Webhook%20Limit%20Increase). ## Disabling a webhook A webhook's **Status** on the **[Webhooks page](https://developer.sibipro.com/webhooks)** controls whether it receives events. A `Disabled` webhook is skipped when an event fires. > **Events that fire while a webhook is disabled are lost** > > Nothing is queued or recorded for a disabled webhook. No delivery is created, so those events do not appear in the > webhook's delivery history and cannot be [redriven](/events/webhook-deliveries#redriving-a-delivery) later. > Re-enabling the webhook resumes deliveries from that point forward; it does not backfill the events that fired while > it was disabled. Redrive is also unavailable on a disabled webhook, so deliveries recorded before it was disabled cannot be re-sent until it is enabled again. ## Deleting a webhook Open a webhook from the **[Webhooks page](https://developer.sibipro.com/webhooks)** and select **Delete**. > **Deletion cannot be undone** > > Deleting a webhook stops its deliveries, removes its signing secret, and removes its delivery history. Registering a > new webhook for the same URL does **not** inherit the old webhook's deliveries, and it gets a new signing secret. ## Authentication Once your server is configured to receive payloads, it'll listen for any payload sent to the endpoint you configured. For security reasons, you'll want to limit requests to those coming from Sibi. SIBI signs every delivery with the webhook's signing secret: we calculate an HMAC-SHA256 of the raw request body using the secret and set the base64 encoded result in the `Signature` http header. Compare that header against your own computation to confirm the request came from SIBI. For an example see below. > **Version 1 events** > > Deliveries with a `webhook-version: 1` header carry the signature in the `HTTP-X-SIBI-SIGNATURE-256` header and the > legacy `HTTP_X_SIBI_SIGNATURE_256` header instead of `Signature`. Those headers are deprecated and go away with > version 1. Read `Signature` for version 2 and later. ### Verify payload signature ```jsx const webhookSignature = req.get('Signature'); const hash = crypto.createHmac('sha256', secret).update(req.rawBody, 'utf8').digest('base64'); const isValid = hash === webhookSignature; ``` ## Ensuring You Receive Events If a webhook request fails, we will retry 5 times with a backoff before permanently failing. ### Status Code Retry Policy We'll consider a webhook delivery successful only if your server returns a status code in the range 200-299. If your server returns any status code outside this range (such as 3xx, 4xx, or 5xx), we will treat it as a failure and retry the delivery. ## Monitoring Deliveries The [SIBI Developer Portal](https://developer.sibipro.com/webhooks) records every delivery we send you: the payload, the outcome, and the status code and response body of each attempt. You can search deliveries by the identifiers inside their payloads, and re-send one after fixing your endpoint. Delivery records are kept for 90 days. See [Monitor Webhook Deliveries](/events/webhook-deliveries). ## Filtering Events The HTTP request will contain a `topic` header that can be used to route the request without parsing the body. The body of all webhook requests will have the following format: ``` { "topic": "topic.name", "data": } ``` The format under "data" will differ by topic and will generally contain the most up to date version of whatever resource type the event is about. It currently emits the following topics: - `order.created` - [Order data](/events/orders) - `order.updated` - [Order data](/events/orders) - `order.exception.created` - [Order exception data](/events/order.exceptions) - `order.cancellationrequest.created` - [Order cancellation request data](/events/order.cancellation-requests) - `order.returnrequest.created` _(beta)_ - [Order return request data](/events/order.return-requests) - `order.returnrequest.item-approved` _(beta)_ - [Order return request data](/events/order.return-requests) - `order.returnrequest.item-denied` _(beta)_ - [Order return request data](/events/order.return-requests) - `order.returnrequest.updated` _(beta)_ - [Order return request data](/events/order.return-requests) - `asset.created` - [Asset data](/events/assets) _(shape depends on [webhook version](#webhook-versions))_ - `asset.updated` - [Asset data](/events/assets) _(shape depends on [webhook version](#webhook-versions))_ - `invoice.created` - [Invoice data](/events/invoices) - `offer.updated` - [Offer data](/events/offers) Topics marked _(beta)_ are in beta and are delivered only to webhooks enrolled in the beta program. Contact Sibi to opt in. ## Webhook Versions Every webhook is registered at a version. The version fixes the shape of the payloads that webhook receives, so a payload never changes under an integration that is already consuming it. - A version only changes on a breaking change to an existing payload. Adding a new topic is not a breaking change. - A new topic is emitted only to webhooks on the latest version at the time the topic is introduced. A webhook on an older version keeps receiving every topic that existed while its version was the latest, but not topics introduced after a newer version was released. For example, if a `foo.created` topic is added while `2` is the latest version, webhooks on version `2` receive it and webhooks on version `1` do not. A topic added while `1` was still the latest version continues to reach version `1` webhooks after `2` is released. - A webhook can be upgraded to a newer version. It can never be downgraded. Before upgrading, read the changelog below and update your handler for every version between the one you are on and the one you are moving to. - Every delivery carries a `webhook-version` header with the version of the payload it contains. ### Changelog

Version 2

Three breaking changes:

  • **Asset ids.** `asset.created` and `asset.updated` prefix the asset `id` with `as_`, matching the ids the [Assets REST API](/api-reference/assets/guide) returns.
  • **Order fees.** `order.*` events no longer include `fees[].title`. Read `fees[].name` instead.
  • **Signature header.** The HMAC moves from `HTTP-X-SIBI-SIGNATURE-256` (and the legacy `HTTP_X_SIBI_SIGNATURE_256`) to a single `Signature` header. See [Verify payload signature](#verify-payload-signature).

Additions:

  • **Invoice due date.** `invoice.created` includes `dueDate`.
  • **Labor decline reason.** `project-phase.labor.declined` includes `reason` and, for `OTHER`, `reasonOther`. See [Project phase events](/events/projects#project-phaselabordeclined).
  • **Comment author name.** `project-phase.comment.created`, `project-phase.comment.updated` and `project-phase.comment.deleted` include `authorName`. See [Project phase events](/events/projects#project-phasecommentcreated).
  • **Project topics.** New topics `project-phase.cancelled`, `project-phase.material-order.placed`, `project-phase.material-order.updated` and `project-phase.material-order.removed`. See [Project phase events](/events/projects#material-orders).

Version 1

Initial release.

## Testing Webhooks We have [a webhook testing tool](https://developer.sibipro.com/webhook-tester) available that you can use to send test events. You can supply any secret you want to use for testing. It provides a number of example payloads you can emit, and you can alter them to test different scenarios. It will reject any payloads that don't match the event schemas, so all events emitted by the tool should be representative of the events you'll receive from Sibi. --- # Monitor Webhook Deliveries Source: https://docs.sibipro.com/events/webhook-deliveries Every webhook SIBI sends to your endpoints is recorded. The **[SIBI Developer Portal](https://developer.sibipro.com/webhooks)** shows those records: which events were sent, what your server returned for each attempt, and the exact payload we posted. You can also re-send any delivery from there. > **Delivery records are kept for 90 days** > > A delivery and its attempts are deleted 90 days after it was first sent. See [Data retention](#data-retention) for > what is stored, and for the size limits on payloads and response bodies. ## Webhooks **[The Webhooks page](https://developer.sibipro.com/webhooks)** lists every webhook configured for your organization: | Column | Meaning | | --- | --- | | URL | The endpoint SIBI posts to | | Topics | The topics this webhook is filtered to. `All topics` means it receives every topic | | Env | `Prod` for webhooks fed by the production API, `Test` for webhooks fed by the [test environment](/rest/test-environment) | | Status | `Enabled` webhooks receive events; `Disabled` ones do not. Events that fire while a webhook is disabled are not recorded as deliveries — see [Disabling a webhook](/events/receive-events#disabling-a-webhook) | | Created at | When the webhook was registered | Selecting a row opens that webhook's deliveries. **Register a webhook** adds one, and **Delete** on a webhook's page removes it — see [Receive Events](/events/receive-events). An organization can have 5 webhooks at a time. ## Deliveries A **delivery** is one event sent to one webhook. It holds the payload, the outcome, and every attempt SIBI made, including the attempts from a redrive. Only events sent to an enabled webhook produce a delivery. While a webhook is disabled, matching events are skipped outright — no delivery is recorded, and re-enabling the webhook does not backfill them. The deliveries list shows, newest first: | Column | Meaning | | --- | --- | | Delivered at | When SIBI first sent the event | | Topic | The event topic, e.g. `order.created` | | Outcome | `Succeeded` if an attempt returned a 2xx status, `Errored` if all attempts failed | | Attempts | How many attempts the delivery has | | Last response | The status of the most recent attempt, e.g. `HTTP 500`, or the connection error | | Duration | How long the most recent attempt took | A delivery that has been re-sent also carries a **Re-sent** badge with the time of the last redrive. ### Filter and search - **Outcome** narrows the list to `Succeeded` or `Errored` deliveries. - **Search payloads** does a full-text search of the stored payloads, scoped to this webhook. Search for an identifier that appears in the body — a PO number, an order id, an invoice id — to find the delivery that carried it. Punctuation inside an identifier is ignored, so `PO-123` and `po123` match the same delivery. - **Refresh** re-reads the list, and **Load more** pages further back in time. Both the filters and the search only see deliveries inside the 90-day retention window. ## Delivery details Selecting a delivery opens it. The page has three sections. **Summary** — the delivery id, the endpoint the payload was sent to, and, when SIBI has them, the event id and the id of the resource the event is about (for example the order id). **Attempts** — one row per attempt, in order: | Column | Meaning | | --- | --- | | Attempt | The attempt number. Redriven attempts continue the same numbering | | Started at | When the request was sent | | Result | The HTTP status your server returned, or `Request failed` when the request never completed | | Duration | How long the request took | | Response | The response body your server returned | SIBI stores the response body only for failed attempts — for a 2xx the row reads `Response body not stored for non-error response`. When the request never got a response at all, the connection error is stored in its place. **Payload** — the exact JSON body SIBI posted, pretty-printed, with a **Copy payload** button. This is the body your signature was computed over. ## Redriving a delivery **Redrive** re-sends a delivery's payload to the webhook's current URL, signed with the webhook's current signing secret. Use it after you have fixed the endpoint that rejected the event, or after your service was down. - The payload is unchanged — the redrive sends what was originally sent, not a fresh snapshot of the resource. - The new attempts are appended to the same delivery, continuing its attempt numbering, and the delivery's outcome is updated to reflect them. - A redrive follows the same [retry policy](/events/receive-events#status-code-retry-policy) as an original send, so it can take a while to finish. The delivery shows `Redrive queued` until the attempt lands, then refreshes on its own. - Redrive is unavailable while a redrive of that delivery is already running, or on a disabled webhook. - A delivery whose payload was too large to store cannot be re-driven. > **Warning** > > Your endpoint must be idempotent. A redrive re-delivers an event your server may have already processed. > > Redriving the non-latest delivery for a particular resource could inaccurately reflect the current state of that resource. ## Data retention Deliveries, their attempts, the response bodies, and the payloads are all deleted 90 days after the delivery was first sent. - **Payloads over 200 KB are not stored.** The delivery still records its attempts and outcome, and the payload section reads `The payload was larger than 200 KB and was not stored with this delivery.` A delivery with no stored payload cannot be found by payload search and cannot be redriven. This limit only applies to what is recorded, the full payload is always sent. - **Response bodies are stored only for failed attempts, truncated at 8 KB.** We log the status code for attempts that returned a 2xx, but discard the body. Connection errors are stored in place of a body, under the same 8 KB limit. A truncated body is shown with a trailing `…`. Redriving a delivery does not extend its retention. The 90 days run from the original send, so a delivery near the end of its window will expire whether or not it has been re-sent. --- # Authentication Source: https://docs.sibipro.com/getting-started/authentication SIBI issues two kinds of tokens, one per API: - **REST API tokens** authenticate the REST APIs at `https://api.sibipro.com`. They are scoped, and the GraphQL API rejects them. See [REST API Tokens](/getting-started/rest-tokens). - **GraphQL tokens** — the tokens described on this page — authenticate the GraphQL API. REST endpoints refuse them; see [GraphQL tokens on REST](/getting-started/rest-tokens#graphql-tokens-on-rest). ## Obtaining an Access Token You can retrieve your token from **[SIBI Developer Portal](https://developer.sibipro.com/)** using your login credentials. ### Example Authorization Header Once you have your token, include it in the `Authorization` header for all API requests: ```http Authorization: Bearer YOUR_ACCESS_TOKEN ``` > **Important: Token Storage** > > - This token **does not expire** and **cannot be retrieved again** after it is issued. > - Store it in a **secure location** you will remember. ## Revoking a Token Either kind of token can revoke itself by sending a `DELETE` request to `/token` with the token in the `Authorization: Bearer` header. ```bash curl -X DELETE https://api.sibipro.com/token \ -H "Authorization: Bearer YOUR_API_TOKEN" ``` A successful revocation returns a `204 No Content` response. After revocation, the token can no longer be used to authenticate requests. --- # Checkout Links Source: https://docs.sibipro.com/getting-started/checkout-links ## Example Most use-cases for our API can be abstracted to "I have picked some items to purchase and would like to place the order". We have found that many of those can have their ordering API needs met with a URL configurable checkout page. For example, the following Checkout link will allow a user to purchase a specific GE model dishwasher and ice making machine: [https://checkout.sibipro.com/?manufacturer=ge\&sku=CDD420P3TD1\&sku=CDD420P2TS1](https://checkout.sibipro.com/?manufacturer=ge&sku=CDD420P2TS1&sku=UNC15NPRII) Most other information from the checkout page can be pre-configured via URL query parameters. For example, the checkout URL can specify a specific property address that order should be associated with, or a specific delivery date to request when placing the order. ## General Order Query Parameters ### `manufacturer` `string` - Name of the manufacturer who makes the product. --- ### `distribution` `string` - Optional parameter to specify which distribution center to order from. If not specified, it will automatically select the distribution center with all products available that is closest to the property associated with the order. --- ### `requestedDeliveryDate` `string` - An ISO8601 date string representing when the order should be delivered. If the requested delivery date is not available, the page will show an error message and allow the user to switch to the earliest available delivery date. If a requested delivery date is not present in URL, the UI will automatically choose the earliest available delivery date. ### `poNumber` `string` - An optional parameter that can be used to pre-fill the po number input field. --- ## Line Item Order Query Parameters Each line item must be prefixed with with a unique `` value, eg. `1.sku=CDD420P2TS1&2.sku=ZJB069BR4P`. At least one line item must be provided. ### `.sku` `string` - SKU is required for each line item. The SKU must belong to the specified `manufacturer` or the page will return an error explaining that the product(s) can't be found. --- ### `.quantity` `integer` - Adjusts the quantity of that line item to purchase. Defaults to 1 when not provided. For example, when you want to order 2 of SKU CDD420P2TS1, you would provide `?1.sku=CDD420P2TS1&1.quantity=2`. --- ### `.unit` `integer` - Adjusts the unit that the line item is purchased in. Defaults to "Each" when not provided. For example, when you want to order a "Box" of SKU CDD420P2TS1, you would provide `?1.sku=CDD420P2TS1&1.unit=Box`. --- ### `.addonId` `string` - Specifies an addon to be purchased for a given line itme. It can be specified more than once to represent more than one addon for a given sku. --- ### `.options` `string` - Specifies a comma separated list of option key/value pairs to be purchased for a given line item. For example, when you want to order SKU CDD420P2TS1 with a red color option, you would provide `?1.sku=CDD420P2TS1&1.options=color,red`. --- ## Extended Warranty Parameters Extended warranty coverage is offered per-product but applies at the order level: all line items belonging to the same order (same shop, distribution center, and fulfillment method) share a single warranty selection. When two or more line items are grouped into the same order, set the warranty parameters on each of those line items to the same value — the checkout UI enforces this for any state changes the user makes after page load. Warranty parameters are only honored when the user's organization has warranty purchases enabled and at least one line item in the order has an eligible warranty. When neither is the case, the parameters are silently ignored and no warranty UI is rendered. ### `.warranty` `boolean` - When `true`, the "Add extended warranty coverage" checkbox on this line item is pre-selected, and an extended warranty line item is added to the order's pricing summary for this product. Defaults to `false`. Example: `?1.sku=CDD420P2TS1&1.warranty=true`. --- ### `.warrantySku` `string` - Optional. Pre-selects a specific warranty SKU for this line item instead of relying on the default auto-pick triggered by `.warranty=true`. The supplied SKU must be one of the warranty options the backend offers for this product; otherwise the checkout page returns an error. When both `.warrantySku` and `.warranty=true` are provided, the explicit `warrantySku` takes precedence. The combination `.warrantySku` with `.warranty=false` is rejected as a conflicting input. --- ### `.warrantyPaymentMethodId` `string` - Optional. Overrides the payment method used to charge the warranty sub-order. If not provided, the warranty sub-order defaults to the first available warranty payment method for the order. Only honored when `.warranty=true` and when the supplied id is present in the order's available warranty payment methods; otherwise it is discarded and the default is used. --- ### `.offeredWarranty` `boolean` - Signals that the link generator already offered extended warranty coverage to the user upstream (for example, on a redirect from a warranty enforcement flow). Suppresses re-prompting the user to opt in. Defaults to `false`. Typically set together with `.warranty=true` by the redirect that performs the enforcement. --- ## Address Parameters The address must provide enough information to unambiguously identify a single address of an existing property in Sibi. If no address information is provided in the URL, the checkout UI will show the user a property picker they can use to select the address they wish to associate with the order. If we find multiple properties that match the address provided, the checkout UI will show the user the property picker with the search term pre-filled with the address provided. The address can either be passed in all at once using the `address` query param, or in pieces using `line1`, `line2`, `city`, `stateOrProvince`, `postalCode` params. If both `address` and the individual pieces are present, the `address` parameter will take precedence. _The pieces API is deprecated and may be removed in the near future._ ### `addressSearch` `string` The complete address as a query param. If a partial address is provided, the UI will attempt to find a single address that matches it. If it can find only one address, it will use it. If it finds multiple, it will show the address picker with the search bar pre-populated with the search term from the query param. ### `line1` _(deprecated)_ `string` - The first line of the address. Generally indicates the house number & street it is located on. Example value: "123 Main Street" ### `line2` _(deprecated)_ `string | undefined` - The second line of the address (optional). Generally used to indicate a unit number. Example value: "Apartment 4B" ### `city` _(deprecated)_ `string` - The city of the address. Example value: "New York City" ### `stateOrProvince` _(deprecated)_ `string` - The state or province of the address. Example value: "New York" ### `postalCode` _(deprecated)_ `string` - The postal code of the address. Example value: "10001" --- # REST API Tokens Source: https://docs.sibipro.com/getting-started/rest-tokens The SIBI REST APIs authenticate with **REST API tokens**. Create one in the **[SIBI Developer Portal](https://developer.sibipro.com/)**, choose the scopes it should carry, and send it as a bearer token: ```http Authorization: Bearer YOUR_REST_API_TOKEN ``` REST API tokens are separate from the GraphQL tokens described in [Authentication](/getting-started/authentication). The two are not interchangeable: - A REST API token works **only** on the REST APIs. The GraphQL API rejects it. - A GraphQL token works **only** on the GraphQL API. The REST APIs reject it. See [GraphQL tokens on REST](#graphql-tokens-on-rest). ## Scoped Permissions Every REST API token has scopes. The scopes you pick at creation time limit what the token may do. An endpoint whose scope the token does not have will refuses the request with an error message indicating what scope is nessary to complete the request. Grant the narrowest set your integration needs. A token that only reads the product catalog should carry `read:products` and nothing else, so a leaked token cannot place or cancel orders. Scopes cannot be added to an existing token. To widen or narrow an integration's access, create a new token with the scopes you want and revoke the old one. ### Available scopes | Scope | Grants | | --- | --- | | `*` | Full access: every scope in the catalog, including ones added later | | `read:*` | Read access to everything in the catalog, including scopes added later | | `cancel:orders` | Request cancellation of existing orders | | `cancel:projects` | Cancel projects | | `create:asset-exports` | Request a file export of your assets | | `create:draft-orders` | Create draft orders to preview an order’s options, pricing, and availability | | `create:feedback` | Send feedback and questions about the Sibi Public API | | `create:from-draft:orders` | Create an order from an existing draft order | | `create:orders` | Create orders | | `create:projects` | Create projects | | `read:agent-tasks` | Read your agent tasks and their results | | `read:asset-exports` | Read the status of your asset exports and download them | | `read:assets` | Read the assets installed at your properties | | `read:draft-orders` | Read draft orders you have created | | `read:field` | Read your Field locations (service trucks), their inventory, and its activity | | `read:invoices` | Read invoices | | `read:offers` | Read offers | | `read:orders` | Read orders | | `read:own:orders` | Read only the orders your user placed | | `read:product-categories` | Read the product category catalog | | `read:product-suppliers` | Read the suppliers whose products you can search | | `read:products` | Read the product catalog | | `read:projects` | Read projects and their phases | | `read:pros` | Read the pros in your network | | `test:permission` | Reserved for verifying that scope enforcement works end to end | | `write:agent-tasks` | Create agent tasks and send messages and feedback | | `write:change-requests` | Approve and reject change requests | | `write:offers` | Create and modify offers | | `write:phase-comments` | Post, edit, and delete comments on project phases | | `write:phase-images` | Upload and attach images to project phases | | `write:phase-schedule` | Propose, confirm, and decline project phase schedules | `*` and `read:*` are wildcards: a token carrying one is granted the matching scopes, including scopes added to the catalog after the token was issued. Prefer naming the scopes you use. ## Production and test tokens are distinct A token is created for one environment and rejected by the other. A production token is refused by the test environment at `https://dev.sibi.pro` with `403 TOKEN_ENVIRONMENT_MISMATCH`, and a test token is refused the same way by `https://api.sibipro.com`. Create a token per environment. See [Test REST Environment](/rest/test-environment) for what the test environment does and does not do. ## Scope refusals | Status | Code | Meaning | | --- | --- | --- | | 401 | `UNAUTHORIZED` | No `Authorization` header, or a token we cannot resolve | | 403 | `INSUFFICIENT_SCOPE` | Valid REST token, but it does not carry a scope this endpoint accepts | | 403 | `REST_TOKEN_REQUIRED` | A GraphQL token was sent to an endpoint that requires a REST API token | | 403 | `TOKEN_ENVIRONMENT_MISMATCH` | The token was created for the other environment | `INSUFFICIENT_SCOPE` means create a token with one more scope. `REST_TOKEN_REQUIRED` means create a REST API token instead of using a GraphQL token. ## GraphQL tokens on REST REST endpoints do not accept GraphQL tokens. Every REST endpoint refuses one with `403 REST_TOKEN_REQUIRED`. The endpoints that accepted GraphQL tokens before scopes existed stopped on October 1, 2026. GraphQL tokens continue to work with the public GraphQL API. To migrate, create a REST API token with the scopes your integration uses, swap it in, and revoke the GraphQL token once nothing depends on it. ## Revoking a token Revoke a token from the [SIBI Developer Portal](https://developer.sibipro.com/), or have the token revoke itself: ```bash curl -X DELETE https://api.sibipro.com/token \ -H "Authorization: Bearer YOUR_REST_API_TOKEN" ``` A successful revocation returns `204 No Content`. The token authenticates nothing afterwards. --- # Get Invoices Source: https://docs.sibipro.com/graphql/invoices/get-invoices > **Deprecated** > > This query is deprecated. Use the REST endpoint > [`GET /invoices`](/api-reference/invoices/operations/list-invoices) instead. It returns the same invoices, > with search, date filters, and pagination, and is the supported way to list invoices. The query continues to > work while integrations move to REST. ## invoices() ```graphql type Query { invoices(search: String, startDate: String, endDate: String, page: Int, pageSize: Int = 25): InvoicesSearchConnection! @deprecated(reason: "Use the REST endpoint GET https://api.sibipro.com/invoices instead.") ordering: OrderingQuery! } ``` ## Input ### `search` `string | undefined` Optional search term to filter invoices by. Can find matches by PO Number, invoice number, date, etc. ### `startDate` `string | undefined` Optional start date to filter invoices by. If provided, it will only return invoices with `invoiceDate` values after `startDate` ### `endDate` `string | undefined` Optional start date to filter invoices by. If provided, it will only return invoices with `invoiceDate` values after `startDate` ### `page` `integer | undefined` The zero-based index of the page to return. The first page is `0`, so `page: 1` returns the **second** page, not the first. Defaults to the first page (`0`) when not provided. ### `pageSize` `integer | undefined` Optional number indicating how many results per-page to return. Defaults to 25. ## Response ## Invoice ### `accountNumber` `string | null` - Identifier for the account being invoiced. These are assigned by the invoice issuer. --- ### `invoiceNumber` `string` - Identifier assigned to the invoice by the invoice issuer. --- ### `createdAt` `string` - Date the invoice was issued. --- ### `orderId` `string` - Identifier assigned by Sibi to the order associated with the invoice. --- ### `totalCents` `integer` - Total amount being invoiced. Given in pennies. --- ### `taxCents` `integer` - Tax amount being invoiced. Given in pennies. --- ### `partner` `string` - Slug of the organization issuing the invoices. (example: `ge`, `ppg`, `johnstone`) --- ### `partnerName` `string` - Name of the organization issuing the invoices. (example: `GE Appliances`, `PPG Paints`) --- ### `partnerIconImageUrl` `string` - URL to the logo of the organization issuing the invoices. --- ### `poNumber` `string | null` - Purchase order number associated with the invoice. This value is defined by the organization that placed the order associated with the invoice. --- ### `propertyAddress` [`FulfillmentAddress`](/graphql/fulfillment-address) - Snapshot of the property address associated with the invoice when the order was created. ### `property` [`InvoiceProperty`](#invoiceproperty) - The property associated with the order. --- ### `lineItems` [`InvoiceLineItem[]`](#invoicelineitem) - The line items from the order associated with the invoice. --- ### `fees` [`InvoiceFee[]`](#invoicefee) - Fees applied to the order associated with the invoice. Empty for invoices issued before fees were captured. --- ### `discounts` [`InvoiceDiscount[]`](#invoicediscount) - Discounts applied to the order associated with the invoice. Amounts are positive magnitudes. Empty for invoices issued before discounts were captured. --- ## `InvoiceLineItem` ### `description` `string | null` - Description of the line item. --- ### `quantity` `integer` - Quantity of the line item purchased. --- ### `unitPriceCents` `integer` - Price of the line item. Given in pennies. --- ### `sku` `string` - Stock keeping unit identifier for the line item. --- ### `serialNumber` `string | null` - Serial number of the line item. Is not always present. --- ## `InvoiceFee` ### `name` `string` - Human readable name of the fee. --- ### `amountCents` `integer` - Amount of the fee. Given in pennies. --- ## `InvoiceDiscount` ### `name` `string` - Human readable name of the discount. --- ### `amountCents` `integer` - Amount of the discount, expressed as a positive magnitude. Given in pennies. --- ## `InvoiceProperty` ### `externalId` `string | null` - Identifier assigned to the property by the property owner. --- # Making a GraphQL Request Source: https://docs.sibipro.com/graphql/making-a-graphql-request The examples below use [curl](https://curl.se/) & [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch). ## Endpoint Our API is available at: [https://graphql.sibipro.com](https://graphql.sibipro.com) This endpoint also hosts a GraphQL playground where you can explore the API and test your queries. ## Authentication The SIBI public API uses API keys to authenticate requests. You can create an API key in the [SIBI developer dashboard](https://developer.sibipro.com). The API expects the key to be included in all requests in the `Authorization` header, prefixed by `Bearer`. ```shell Curl curl \ --request POST \ --header 'Authorization: Bearer ' \ --data '{"query": ""}' \ https://graphql.sibipro.com # => {"data": {...}} ``` ```javascript Fetch const response = await fetch('https://graphql.sibipro.com, { method: 'POST', headers: { 'Authorization': `Bearer ${yourApiKey}` }, body: JSON.stringify({ query: ''}), }); const body = await response.json(); const invoices = body.data.invoices.edges; console.log(JSON.stringify(invoices, null, 2)) # => {"data": {...}} ``` ## Querying All requests are made using the `POST` method. The body of the request should be a JSON object with a `query` key. The value of the `query` key should be a GraphQL query. The following examples show how to ask for just the invoice number of all invoices. ```shell Curl curl \ --request POST \ --header 'Authorization: Bearer ' \ --data '{"query": "query Invoices() { invoices { edges { invoiceNumber } } }"}' \ https://graphql.sibipro.com ``` ```javascript Fetch const query = `# graphql query Invoices() { invoices { edges { invoiceNumber } } } `; const response = await fetch('https://graphql.sibipro.com', { method: 'POST', headers: { Authorization: `Bearer ${yourApiKey}` }, body: JSON.stringify({ query }), }); const body = await response.json(); const invoices = body.data.invoices.edges; console.log(JSON.stringify(invoices, null, 2)); ``` The API will return a JSON response: ```json Response { "data": { "invoices": { "edges": [{ "invoiceNumber": "INV-0001" }, { "invoiceNumber": "INV-0002" }] } } } ``` ## Projections The GraphQL API will only return the specific fields requested in the query. This is called a projection. The following example query shows how to ask for the invoice date and total of all invoices. ```graphql query Invoices() { invoices { edges { invoiceDate total } } } ``` To request every property available, you can use this query: ```graphql query Invoices() { invoices { page hasNextPage hasPreviousPage totalHits totalPageCount edges { accountNumber invoiceNumber invoiceDate orderIdentifier total tax partner partnerName partnerIconImageUrl poNumber propertyAddress { line1 line2 city stateOrProvince postalCode } lineItems { description quantity unitPriceAmount sku serialNumber } } } } ``` For a description list of each of the fields, see the [Invoice Schema](https://sibipro.readme.io/docs/invoice). ## Pagination The SIBI public API uses page-based pagination (as opposed to cursor-based). By default, the API returns the first page of results. If included in the query projection, the reponse will include pagination information including the current page and whether or not there is a next page: ```graphql query InvoicesPage { invoices(page: 0) { currentPage hasNextPage } } ``` Will return: ```json { "data": { "invoices": { "currentPage": 1, "hasNextPage": true } } } ``` --- # OrderingMutation.createDraftOrder() Source: https://docs.sibipro.com/graphql/ordering/create-draft-order > **Deprecated** > > This mutation is deprecated. Use the REST endpoint > [`POST /draft-orders`](/api-reference/draft-orders/operations/create-draft-order) instead. It creates the same > draft order and is the supported way to create one. The mutation continues to work while integrations move to > REST. ```graphql type OrderingMutation { createDraftOrder(input: OrderingCreateDraftOrderInput!): OrderingDraftOrder! @deprecated(reason: "Use the REST endpoint POST https://api.sibipro.com/draft-orders instead.") } ``` ### `OrderingCreateDraftOrderInput` The input is the same as the [`OrderingMutation.createOrder()`](/graphql/ordering/create-order) API except that the `paymentMethodId` is optional and it does not take an `idempotencyKey`. ```graphql input OrderingCreateDraftOrderInput @tag(name: "public") { manufacturer: String! address: OrderingAddressInput! products: [OrderingOrderProductInput!]! contactInfo: OrderingCustomerContactInfoInput! fulfillmentMethodId: String fulfillmentMethodType: OrderingFulfillmentMethodType shipToOfficePropertyId: String requestedDeliveryDate: String poNumber: String specialInstructions: String distributionCenterId: String paymentMethodId: String subscribers: [OrderingOrderSubscriberInput!] } ``` ### `manufacturer` `string` - The manufacturer of the products in the order. --- ### `address` [`OrderingAddressInput`](/graphql/ordering/ordering-address) - The address should correspond to a valid property in the system. If there is no matching property and the address is valid, a new property will be created. If the address is not valid, the mutation will fail with an error. --- ### `products` [`OrderingOrderProductInput[]`](/graphql/ordering/ordering-order-product-input) - An array of order products. At least one product must be specified. --- ### `contactInfo` [`OrderingCustomerContactInfoInput`](/graphql/ordering/ordering-customer-contact-info-input) - Information about how to contact the customer. This information is what the delivery agent will use to contact the customer if there is an issue with the order. --- ### `fulfillmentMethodId` `string | null` - The ID of a specific fulfillment method to use. Pass the `id` from one of the `availableFulfillmentMethods` returned by [`reviewOrder`](/graphql/ordering/review-order). Cannot be specified together with `fulfillmentMethodType`. When not provided, the API will automatically select a fulfillment method using this logic: 1. If the distributor has a configured default for the resolved type, that default is used. 2. Otherwise, the first available method for the resolved type is used. We recommend calling [`reviewOrder`](/graphql/ordering/review-order) first to discover `availableFulfillmentMethods`, then passing the desired `id` explicitly. --- ### `fulfillmentMethodType` `OrderingFulfillmentMethodType | null` - The type of fulfillment method to use. Defaults to `DELIVERY` if neither `fulfillmentMethodId` nor `fulfillmentMethodType` is provided. If the distributor only has pickup available, it will fall back to `PICKUP`. Cannot be specified together with `fulfillmentMethodId`. --- ### `shipToOfficePropertyId` `string` - The property id of the office to ship the order to. Is only valid to be provied if the fulfillmentMethodId is `ship-to-office`. If the id is provided when the fulfillmentMethodId is not `ship-to-office`, the mutation will fail with an error. If the fulfillmentMethodId is `ship-to-office` and this value is not provided, the mutation will fail with an error. --- ### `requestedDeliveryDate` `string` - The date the customer wants the order delivered. If not provided, defaults to the earliest available. If the provided date is not available, the mutation will fail with an error. --- ### `poNumber` `string` - The purchase order number for the order. Can be anything you want. It doesn't even need to be a number. --- ### `specialInstructions` `string` - The special instructions for fulfilling the order. E.g. "the lock code is 1234". --- ### `distributionCenterId` `string` - The ID of the distribution center to place the order in. If not provided, the order will be placed in the closest distribution center to the provided address that has the product available. --- ### `paymentMethodId` `string` - The ID of the payment method to use for the order. If not provided, defaults to the default first payment method for the user. If multiple payment methods are available, it is recommended to request the `paymentMethodId` in the response to the createDraftOrder mutation so that you can confirm the correct one was selected. If you need to see which payment methods are available, you can use the `availablePaymentMethods` field on the `OrderingDraftOrder` type. Note that you will need to create a new draft order to change the payment method. --- ### `subscribers` `OrderingOrderSubscriberInput[]` - An optional list of subscribers to receive updates about the order in addition to the user account that placed the order. If the email is not formatted correctly, the mutation will fail with an error. If at least one subscriber is provided, then only email addresses specified in the subscribers will receive automatic email updates when the order created from this draft is updated. If no subscribers are provided, then the platform will send email updates to the user account that placed the order as well as the email addresses specified in the contactInfo field, but only if it doesn't match the email address of the primary resident at the property the order is placed for. --- ## Response ### `OrderingDraftOrder` [`OrderingDraftOrder`](#orderingdraftorder) - The draft order that was created. The `OrderingDraftOrder` type is the same as the `OrderingReviewOrderResponse` type, but with an additional `id` field that can be used to retrieve the draft order and to place an order based on it. ```graphql type OrderingDraftOrder { id: ID! address: OrderingAddress! manufacturer: String! createdAt: String! orderId: String orderInSibiStoreUrl: String products: [OrderingOrderProduct!]! contactInfo: OrderingCustomerContactInfo distributionCenter: OrderingDistributionCenter! taxCents: Int! subtotalCents: Int! totalPriceCents: Int! fees: [OrderingFee!]! discounts: [OrderingDiscount!]! poNumber: String specialInstructions: String fulfillmentMethod: OrderingFulfillmentMethod! requestedDeliveryDate: String! paymentMethodId: String! availablePaymentMethods: [OrderingPaymentMethod!]! availableFulfillmentMethods: [OrderingFulfillmentMethod!]! subscribers: [OrderingOrderSubscriber!]! } ``` --- ### `id` `string` - The ID of the draft order. This ID can be used to retrieve the draft order and to place an order based on it. --- ### `address` `OrderingAddress` - The property address associated with the order. If the fulfillmentMethod is `DELIVERY`, this is the address the order will be shipped to. --- ### `manufacturer` `string` - The manufacturer associated with the draft order. --- ### `createdAt` `string` - The timestamp when the draft order was created. --- ### `orderId` `string | undefined` - The ID of the order that was created from this draft order, if one has been placed. --- ### `orderInSibiStoreUrl` `string | undefined` - A URL to view the order in the SIBI store, if an order has been placed from this draft. --- ### `products` [`OrderingOrderProduct[]`](/graphql/ordering/ordering-order-product) - An array of order products. --- ### `contactInfo` `OrderingCustomerContactInfo | undefined` - The contact information that was passed in. Has all the same properties as [`OrderingCustomerContactInfoInput`](/graphql/ordering/ordering-customer-contact-info-input). ### `distributionCenter` [`OrderingDistributionCenter`](#orderingdistributioncenter) - The distribution center where the order will be placed. --- ### `taxCents` `number` - The total tax amount for the order, in cents. --- ### `subtotalCents` `number` - The subtotal for the order, in cents. --- ### `totalPriceCents` `number` - The total price for the order, in cents. This is the sum of the subtotal and tax. --- ### `fees` [`OrderingFee[]`](/graphql/ordering/review-order#orderingfee) - An array of fees applied to the order. --- ### `discounts` [`OrderingDiscount[]`](/graphql/ordering/review-order#orderingdiscount) - An array of discounts applied to the order. --- ### `poNumber` `string | undefined` - The purchase order number that was passed in. --- ### `specialInstructions` `string | undefined` - The special instructions that were passed in. --- ### `fulfillmentMethod` `OrderingFulfillmentMethod` - One of `DELIVERY` or `PICKUP`. This is the fulfillment method that will be used for the order. Will always return a valid value for the order. If an invalid fulfillment method was passed to `reviewOrder()`, the query will fail with an error. --- ### `requestedDeliveryDate` `string` - The requested delivery date for the order. The value returned will be a valid delivery date for the product & distribution center. If an invalid delivery date was passed to `revierOrder()`, the query will fail with an error. --- ### `availableDeliveryDates` `string[]` - An array of available delivery dates for the order. The array will always contain at least one value. If there are no available delivery dates, the query will fail with an error. --- ### `paymentMethodId` `string` - The ID of the payment method that will be used for the order. If no payment method was passed to `reviewOrder()`, the API will pick a value from \`availablePaymentMethods\`\` and return a sensible default. --- ### `availablePaymentMethods` [`OrderingPaymentMethod[]`](#orderingpaymentmethod) - An array of available payment methods for the order. The array will always contain at least one value. If there are no available payment methods, the query will fail with an error. > **Note** > > On the [test environment](/graphql/test-environment) (`https://dev.sibi.pro/graphql`), if the caller has no usable saved Stripe payment method — meaning no bank account and no unexpired card — a Stripe test card is created and saved to them automatically before the order is validated, and it is returned here alongside any other saved methods. Test integrations therefore do not need to provision a card before placing test orders. Callers who already have a usable payment method keep exactly the methods they have. Requests to the production endpoint never get a test card. --- ### `availableFulfillmentMethods` [`OrderingFulfillmentMethod[]`](#orderingfulfillmentmethod) - An array of available fulfillment methods for the order. --- ### `subscribers` `OrderingOrderSubscriber[]` - An array of subscribers that will receive updates about the order. --- ## `OrderingOrderSubscriber` ```graphql type OrderingOrderSubscriber { email: String! } ``` --- ## `OrderingAddress` ```graphql type OrderingAddress { line1: String! line2: String city: String! stateOrProvince: String! postalCode: String! country: String } ``` Both line2 and country are optional. All other fields are required. `reviewOrder` will only return a valid addresses for properties registered with SIBI. If an invalid address is passed to `reviewOrder()`, the query will fail with an error. --- ## `OrderingDistributionCenter` ```graphql type OrderingDistributionCenter { id: ID! name: String! latitude: Float longitude: Float address: OrderingAddress! imageUrl: String storeNumber: String! phone: String } ``` ### `id` `string` - The distribution center's unique identifier. Use this when placing orders at a specific DC. --- ### `name` `string` - The name of the distribution center. --- ### `latitude` `number | undefined` - The latitude of the distribution center's location. --- ### `longitude` `number | undefined` - The longitude of the distribution center's location. --- ### `address` [`OrderingAddress`](#orderingaddress) - The address of the distribution center. --- ### `imageUrl` `string | undefined` - The URL of the distribution center's logo. --- ### `storeNumber` `string` - The store number of the distribution center. May not actually be numeric. --- ### `phone` `string | undefined` - The phone number of the distribution center, as the distributor publishes it. Absent when the distributor has not provided one. --- ### `fulfillmentMethods` [`OrderingFulfillmentMethod[]`](#orderingfulfillmentmethod) - An array of fulfillment methods that are available for the distribution center. --- ## `OrderingFulfillmentMethod` ```graphql type OrderingFulfillmentMethod { id: String! title: String! description: String type: OrderingFulfillmentMethodType! dates: [String!]! } enum OrderingFulfillmentMethodType { DELIVERY PICKUP } ``` ### `id` `string` - The unique identifier for the fulfillment method. Use this when placing orders with a specific fulfillment method. --- ### `title` `string` - The human-readable title of the fulfillment method. --- ### `description` `string | undefined` - An optional description providing additional details about the fulfillment method. --- ### `type` `OrderingFulfillmentMethodType` - The type of fulfillment method. Either `DELIVERY` or `PICKUP`. --- ### `dates` `string[]` - An array of available dates for this fulfillment method. --- ## `OrderingPaymentMethod` ```graphql union OrderingPaymentMethod = OrderingPaymentMethodManufacturerCredit | OrderingPaymentMethodStripe type OrderingPaymentMethodManufacturerCredit { id: String! description: String! } type OrderingPaymentMethodStripe { id: String! description: String! last4: String! } ``` These are the two possible payment methods that can be returned by `reviewOrder()`. The `id` and `description` fields are always returned. The `last4` field is only returned for `OrderingPaymentMethodStripe`. --- ### `id` `string` - The ID of the payment method. --- ### `description` `string` - A human-readable description of the payment method. --- ### `last4` `string` - The last 4 digits of the credit card number. Only returned for `OrderingPaymentMethodStripe`. --- # OrderingMutation.createOrder() Source: https://docs.sibipro.com/graphql/ordering/create-order > **Deprecated** > > This mutation is deprecated. Use the REST endpoint > [`POST /orders`](/api-reference/orders/operations/post) instead. It places the same order and is the > supported way to create an order. The mutation continues to work while integrations move to REST. _Tip: We provide a [URL configurable Checkout UI](/getting-started/checkout-links) to make using these capabilities a breeze. We recommend using that for most use cases. If you need more control over the experience, we recommend you use the Order review and Order placement capabilities directly._ The response includes the orderId and a URL to view the order on the SIBI web app. See [`OrderingQuery.reviewOrder()`](/graphql/ordering/review-order) for a dry-run version of this mutation that can be used to validate the input and discover available parameter values. ## Types ```graphql type OrderingMutation { createOrder(input: OrderingCreateOrderInput!): OrderingCreateOrderResponse! @deprecated(reason: "Use the REST endpoint POST https://api.sibipro.com/orders instead.") } ``` - [`input: OrderingCreateOrderInput`](#orderingcreateorderinput) - [`response: OrderingCreateOrderResponse`](#orderingcreateorderresponse) ## `OrderingCreateOrderInput` ```graphql input OrderingCreateOrderInput { manufacturer: String! address: OrderingAddressInput! products: [OrderingOrderProductInput!]! contactInfo: OrderingCustomerContactInfoInput! fulfillmentMethodId: String fulfillmentMethodType: OrderingFulfillmentMethodType shipToOfficePropertyId: String requestedDeliveryDate: String poNumber: String specialInstructions: String distributionCenterId: String paymentMethodId: String! subscribers: [OrderingOrderSubscriberInput!] idempotencyKey: String warrantyOrderPaymentMethodId: String } ``` ### `manufacturer` `string` - The manufacturer of the products to order. Examples: `'GE'`, `'MSI'`. --- ### `address` [`OrderingAddressInput`](/graphql/ordering/ordering-address) - The address should correspond to a valid property in the system. If there is no matching property and the address is valid, a new property will be created. If the address is not valid, the mutation will fail with an error. --- ### `products` [`OrderingOrderProductInput[]`](/graphql/ordering/ordering-order-product-input) - At least one product must be specified --- ### `contactInfo` [`OrderingCustomerContactInfoInput`](/graphql/ordering/ordering-customer-contact-info-input) --- ### `fulfillmentMethodId` `string | null` - The ID of a specific fulfillment method to use. Pass the `id` from one of the `availableFulfillmentMethods` returned by [`reviewOrder`](/graphql/ordering/review-order). Cannot be provided together with `fulfillmentMethodType`. When not provided, the API will automatically select a fulfillment method using this logic: 1. If the distributor has a configured default for the resolved type, that default is used. 2. Otherwise, the first available method for the resolved type is used. We recommend calling [`reviewOrder`](/graphql/ordering/review-order) first to discover `availableFulfillmentMethods`, then passing the desired `id` explicitly. --- ### `fulfillmentMethodType` [`OrderingFulfillmentMethodType`](/graphql/ordering/review-order#orderingfulfillmentmethod) `| null` - The type of fulfillment method to use. Defaults to `DELIVERY` if neither `fulfillmentMethodId` nor `fulfillmentMethodType` is provided. Cannot be provided together with `fulfillmentMethodId`. --- ### `shipToOfficePropertyId` `string | null` - The property ID of the office to ship the order to. Only valid when `fulfillmentMethodId` is `'ship-to-office'`. If provided with a different fulfillment method, the mutation will fail with an error. Required when `fulfillmentMethodId` is `'ship-to-office'`. --- ### `requestedDeliveryDate` `string | null` - The date the customer wants the order delivered. If not provided, defaults to the earliest available. If the provided date is not available, the mutation will fail with an error. --- ### `poNumber` `string | null` - Can be anything you want. It doesn't even need to be a number. --- ### `specialInstructions` `string | null` - E.g. the lock code is 1234 --- ### `distributionCenterId` `string | null` - If omitted the order will be placed in the closest distribution center. --- ### `paymentMethodId` `string` - Note that unlike in `OrderingReviewOrderInput`, the paymentMethodId is required here. > **Note** > > On the [test environment](/graphql/test-environment) (`https://dev.sibi.pro/graphql`), if the caller has no usable saved Stripe payment method — meaning no bank account and no unexpired card — a Stripe test card is created and saved to them automatically before the order is validated. Use [`reviewOrder`](/graphql/ordering/review-order) to read the resulting `availablePaymentMethods` and pick an `id` from it; test integrations do not need to provision a card separately. Callers who already have a usable payment method keep exactly the methods they have. Requests to the production endpoint never get a test card. --- ### `subscribers` `OrderingOrderSubscriberInput[]` - An array of subscribers that will receive updates about the order. If the email is not formatted correctly, the mutation will fail with an error. If at least one subscriber is provided, then only email addresses specified in the subscribers will receive automatic email updates when the order status is updated. If no subscribers are provided, then the platform will send email updates to the user account that placed the order as well as the email addresses specified in the contactInfo field, but only if it doesn't match the email address of the primary resident at the property the order is placed for. --- ## `OrderingOrderSubscriber` ```graphql type OrderingOrderSubscriberInput { email: String! } ``` --- ### `idempotencyKey` `string | null` - A unique identifier for this request. If the same idempotency key is used for two identical order requests, the second request will return the order created by the first request instead of creating a duplicate order. If the first request failed, the second request will make another attempt. If the requests have different inputs, both orders will be processed normally. --- ### `warrantyOrderPaymentMethodId` `string | null` - If provided, this payment method is used for the extended-warranty sub-order instead of the parent order's `paymentMethodId`. Must be one of the [`warranties.availablePaymentMethods`](/graphql/ordering/ordering-review-order-warranties#availablepaymentmethods) returned by [`reviewOrder`](/graphql/ordering/review-order). Ignored when no warranty coverage is applied to the order. --- ## `OrderingCreateOrderResponse` ```graphql type OrderingCreateOrderResponse { orderId: String! orderInSibiStoreUrl: String! warrantyOrderId: String warrantyOrderInSibiStoreUrl: String } ``` --- ### `orderId` `string` - Internal SIBI order identifier. --- ### `orderInSibiStoreUrl` `string` - URL to the order in the SIBI web app. --- ### `warrantyOrderId` `string | null` - Internal SIBI order identifier for the extended-warranty sub-order. Present only when the request included a warranty selection and the warranty sub-order was created successfully. --- ### `warrantyOrderInSibiStoreUrl` `string | null` - URL to the extended-warranty sub-order in the SIBI web app. Present only when the request included a warranty selection and the warranty sub-order was created successfully. --- # OrderingMutation.createOrderFromDraft() Source: https://docs.sibipro.com/graphql/ordering/create-order-from-draft > **Deprecated** > > This mutation is deprecated. Use the REST endpoint > [`POST /draft-orders/{id}/order`](/api-reference/draft-orders/operations/create-order-from-draft) instead. It > places the same order from the draft and is the supported way to do so. The mutation continues to work while > integrations move to REST. ```graphql type OrderingMutation { createOrderFromDraft(id: ID!, idempotencyKey: String): OrderingCreateOrderResponse! @deprecated(reason: "Use the REST endpoint POST https://api.sibipro.com/draft-orders/{id}/order instead.") } ``` > **Note** > > On the [test environment](/graphql/test-environment) (`https://dev.sibi.pro/graphql`), if the caller has no usable saved Stripe payment method — meaning no bank account and no unexpired card — a Stripe test card is created and saved to them automatically before the order is validated, so test integrations do not need to provision a card first. Callers who already have a usable payment method keep exactly the methods they have. Requests to the production endpoint never get a test card. ## Input ### `id` `string` - The ID of the draft order to retrieve. ### `idempotencyKey` `string | undefined` - A unique key to identify an attempt to create a unique order. If the same key is used multiple times with a draft order that has identical inputs, the order will be created only once and subsequent calls will return the same order. Note that it does not necessarily need to be the same draft order id for it to prevent duplicate orders. If omitted, it will create a new order for each call. ## Response ### `OrderingCreateOrderResponse` ```graphql type OrderingCreateOrderResponse { orderId: String! orderInSibiStoreUrl: String! } ``` --- #### `orderId` `string` - Internal SIBI order identifier. --- #### `orderInSibiStoreUrl` `string` - URL to the order in the SIBI web app. --- # OrderingMutation.deleteDraftOrder() Source: https://docs.sibipro.com/graphql/ordering/delete-draft-order > **Deprecated** > > This mutation is deprecated and will be removed. A draft order reserves nothing and charges nothing, so an > unwanted draft can be left in place. The mutation continues to work until it is removed. ```graphql type OrderingMutation { deleteDraftOrder(id: ID!): OrderingDeleteDraftOrderResponse! @deprecated(reason: "This mutation will be removed.") } ``` ## Input ### `id` `string` - The ID of the draft order to delete. ## Response ### `OrderingDeleteDraftOrderResponse` ```graphql type OrderingDeleteDraftOrderResponse { success: Boolean! } ``` --- #### `success` `boolean` - Whether the draft order was successfully deleted. --- # OrderingQuery.asset() Source: https://docs.sibipro.com/graphql/ordering/get-asset > **Deprecated** > > This query is deprecated. Use the REST endpoint > [`GET /assets/{id}`](/api-reference/assets/operations/get-asset) instead. It returns the same asset fields, accepts > the same `id` you pass here (with or without the `as_` prefix REST responses carry), and is the supported way to > read one asset. The query continues to work while integrations move to REST. ```graphql type OrderingQuery { asset(id: ID!): OrderingAsset @deprecated(reason: "Use the REST endpoint GET https://api.sibipro.com/assets/{id} instead.") } ``` ## Input ### `id` `string` - The unique identifier of the asset to retrieve. ## Response ### `OrderingAsset` [`OrderingAsset | null`](/graphql/ordering/ordering-asset) - The asset object containing all asset details. Null if no asset exists with the given id. --- # OrderingQuery.getDraftOrder() Source: https://docs.sibipro.com/graphql/ordering/get-draft-order > **Deprecated** > > This query is deprecated. Use the REST endpoint > [`GET /draft-orders/{id}`](/api-reference/draft-orders/operations/get-draft-order) instead. It returns the same > draft order and is the supported way to retrieve a draft order. The query continues to work while integrations > move to REST. ```graphql type OrderingQuery { draftOrder(id: ID!): OrderingDraftOrder! @deprecated(reason: "Use the REST endpoint GET https://api.sibipro.com/draft-orders/{id} instead.") } ``` ## Input ### `id` `string` - The ID of the draft order to retrieve. ## Response ### `OrderingDraftOrder` [`OrderingDraftOrder`](#orderingdraftorder) - The draft order that was created. The `OrderingDraftOrder` type is the same as the `OrderingReviewOrderResponse` type, but with an additional `id` field that can be used to retrieve the draft order and to place an order based on it. ```graphql type OrderingDraftOrder { id: ID! address: OrderingAddress! manufacturer: String! createdAt: String! orderId: String orderInSibiStoreUrl: String products: [OrderingOrderProduct!]! contactInfo: OrderingCustomerContactInfo distributionCenter: OrderingDistributionCenter! taxCents: Int! subtotalCents: Int! totalPriceCents: Int! fees: [OrderingFee!]! discounts: [OrderingDiscount!]! poNumber: String specialInstructions: String fulfillmentMethod: OrderingFulfillmentMethod! requestedDeliveryDate: String! paymentMethodId: String! availablePaymentMethods: [OrderingPaymentMethod!]! availableFulfillmentMethods: [OrderingFulfillmentMethod!]! subscribers: [OrderingOrderSubscriber!]! } ``` --- ### `id` `string` - The ID of the draft order. This ID can be used to retrieve the draft order and to place an order based on it. --- ### `address` `OrderingAddress` - The property address associated with the order. If the fulfillmentMethod is `DELIVERY`, this is the address the order will be shipped to. --- ### `manufacturer` `string` - The manufacturer associated with the draft order. --- ### `createdAt` `string` - The timestamp when the draft order was created. --- ### `orderId` `string | undefined` - The ID of the order that was created from this draft order, if one has been placed. --- ### `orderInSibiStoreUrl` `string | undefined` - A URL to view the order in the SIBI store, if an order has been placed from this draft. --- ### `products` [`OrderingOrderProduct[]`](/graphql/ordering/ordering-order-product) - An array of order products. --- ### `contactInfo` `OrderingCustomerContactInfo | undefined` - The contact information that was passed in. Has all the same properties as [`OrderingCustomerContactInfoInput`](/graphql/ordering/ordering-customer-contact-info-input). ### `distributionCenter` [`OrderingDistributionCenter`](#orderingdistributioncenter) - The distribution center where the order will be placed. --- ### `taxCents` `number` - The total tax amount for the order, in cents. --- ### `subtotalCents` `number` - The subtotal for the order, in cents. --- ### `totalPriceCents` `number` - The total price for the order, in cents. This is the sum of the subtotal and tax. --- ### `fees` [`OrderingFee[]`](/graphql/ordering/review-order#orderingfee) - An array of fees applied to the order. --- ### `discounts` [`OrderingDiscount[]`](/graphql/ordering/review-order#orderingdiscount) - An array of discounts applied to the order. --- ### `poNumber` `string | undefined` - The purchase order number that was passed in. --- ### `specialInstructions` `string | undefined` - The special instructions that were passed in. --- ### `fulfillmentMethod` `OrderingFulfillmentMethod` - One of `DELIVERY` or `PICKUP`. This is the fulfillment method that will be used for the order. Will always return a valid value for the order. If an invalid fulfillment method was passed to `reviewOrder()`, the query will fail with an error. --- ### `requestedDeliveryDate` `string` - The requested delivery date for the order. The value returned will be a valid delivery date for the product & distribution center. If an invalid delivery date was passed to `revierOrder()`, the query will fail with an error. --- ### `availableDeliveryDates` `string[]` - An array of available delivery dates for the order. The array will always contain at least one value. If there are no available delivery dates, the query will fail with an error. --- ### `paymentMethodId` `string` - The ID of the payment method that will be used for the order. If no payment method was passed to `reviewOrder()`, the API will pick a value from \`availablePaymentMethods\`\` and return a sensible default. --- ### `availablePaymentMethods` [`OrderingPaymentMethod[]`](#orderingpaymentmethod) - An array of available payment methods for the order. The array will always contain at least one value. If there are no available payment methods, the query will fail with an error. > **Note** > > These are the payment methods captured when the draft was created. On the [test environment](/graphql/test-environment) (`https://dev.sibi.pro/graphql`), a caller with no usable saved Stripe payment method — meaning no bank account and no unexpired card — has a Stripe test card created and saved to them automatically while the draft is being created, so it shows up here like any other saved method. Requests to the production endpoint never get a test card. --- ### `availableFulfillmentMethods` [`OrderingFulfillmentMethod[]`](#orderingfulfillmentmethod) - An array of available fulfillment methods for the order. --- ### `subscribers` `OrderingOrderSubscriber[]` - An array of subscribers that will receive updates about the order. --- ### `OrderingOrderSubscriber` ```graphql type OrderingOrderSubscriber { email: String! } ``` --- ## `OrderingAddress` ```graphql type OrderingAddress { line1: String! line2: String city: String! stateOrProvince: String! postalCode: String! country: String } ``` Both line2 and country are optional. All other fields are required. `reviewOrder` will only return a valid addresses for properties registered with SIBI. If an invalid address is passed to `reviewOrder()`, the query will fail with an error. --- ## `OrderingDistributionCenter` ```graphql type OrderingDistributionCenter { id: ID! name: String! latitude: Float longitude: Float address: OrderingAddress! imageUrl: String storeNumber: String! phone: String } ``` ### `id` `string` - The distribution center's unique identifier. Use this when placing orders at a specific DC. --- ### `name` `string` - The name of the distribution center. --- ### `latitude` `number | undefined` - The latitude of the distribution center's location. --- ### `longitude` `number | undefined` - The longitude of the distribution center's location. --- ### `address` [`OrderingAddress`](#orderingaddress) - The address of the distribution center. --- ### `imageUrl` `string | undefined` - The URL of the distribution center's logo. --- ### `storeNumber` `string` - The store number of the distribution center. May not actually be numeric. --- ### `phone` `string | undefined` - The phone number of the distribution center, as the distributor publishes it. Absent when the distributor has not provided one. --- ### `fulfillmentMethods` [`OrderingFulfillmentMethod[]`](#orderingfulfillmentmethod) - An array of fulfillment methods that are available for the distribution center. --- ## `OrderingFulfillmentMethod` ```graphql type OrderingFulfillmentMethod { id: String! title: String! description: String type: OrderingFulfillmentMethodType! dates: [String!]! } enum OrderingFulfillmentMethodType { DELIVERY PICKUP } ``` ### `id` `string` - The unique identifier for the fulfillment method. Use this when placing orders with a specific fulfillment method. --- ### `title` `string` - The human-readable title of the fulfillment method. --- ### `description` `string | undefined` - An optional description providing additional details about the fulfillment method. --- ### `type` `OrderingFulfillmentMethodType` - The type of fulfillment method. Either `DELIVERY` or `PICKUP`. --- ### `dates` `string[]` - An array of available dates for this fulfillment method. --- ## `OrderingPaymentMethod` ```graphql union OrderingPaymentMethod = OrderingPaymentMethodManufacturerCredit | OrderingPaymentMethodStripe type OrderingPaymentMethodManufacturerCredit { id: String! description: String! } type OrderingPaymentMethodStripe { id: String! description: String! last4: String! } ``` These are the two possible payment methods that can be returned by `reviewOrder()`. The `id` and `description` fields are always returned. The `last4` field is only returned for `OrderingPaymentMethodStripe`. --- ### `id` `string` - The ID of the payment method. --- ### `description` `string` - A human-readable description of the payment method. --- ### `last4` `string` - The last 4 digits of the credit card number. Only returned for `OrderingPaymentMethodStripe`. --- # OrderingQuery.order() Source: https://docs.sibipro.com/graphql/ordering/get-order > **Deprecated** > > This query is deprecated. Use the REST endpoint > [`GET /orders/{id}`](/api-reference/orders/operations/get-id) instead. It returns the same order and is > the supported way to retrieve an order by ID. The query continues to work while integrations move to REST. ```graphql type OrderingQuery { order(id: ID!): OrderingOrder! @deprecated(reason: "Use the REST endpoint GET https://api.sibipro.com/orders/{id} instead.") } ``` ## Input ### `id` `string` - The unique identifier for the order to retrieve. ## Response ### `OrderingOrder` [`OrderingOrder`](/graphql/ordering/ordering-order) - The order object containing all order details. --- # OrderingQuery.assets() Source: https://docs.sibipro.com/graphql/ordering/list-assets > **Deprecated** > > This query is deprecated. Use the REST endpoint > [`GET /assets`](/api-reference/assets/operations/list-assets) instead. It returns the same assets and is the > supported way to list assets. The query continues to work while integrations move to REST. ```graphql type OrderingQuery { assets(address: OrderingAddressInput, first: Int = 10, after: String): OrderingAssetsConnection! @deprecated(reason: "Use the REST endpoint GET https://api.sibipro.com/assets instead.") } ``` > **Warning** > > Browsing without an address is meant for one-off backfills, not realtime use, and can be slow at scale. ## Input ### `address` (optional) [`OrderingAddressInput`](/graphql/ordering/ordering-address) - The property address to look up assets for. If omitted, browses every asset across all properties the caller can see (see the warning above). ### `first` (optional) `Int` - The maximum number of assets to return per page. Defaults to `10`. ### `after` (optional) `String` - A cursor value used for pagination. Use the `cursor` value from the last edge of the previous response to fetch the next page. > **Warning** > > Cursors are mode-specific: a cursor obtained from a browse (no address) cannot be used with an address, and vice versa. **Example:** ```graphql query GetAssetsAtProperty { ordering { assets(address: { line1: "123 Main St", city: "Anytown", stateOrProvince: "CA", postalCode: "90210" }) { edges { cursor node { id name } } } } } ``` ## Response ### `OrderingAssetsConnection` [`OrderingAssetsConnection`](#orderingassetsconnection) - A connection object containing a list of assets. ## `OrderingAssetsConnection` ```graphql type OrderingAssetsConnection { edges: [OrderingAssetsEdge!]! } ``` ### `edges` [`OrderingAssetsEdge[]`](#orderingassetsedge) - An array of edges, each containing an asset node. ## `OrderingAssetsEdge` ```graphql type OrderingAssetsEdge { node: OrderingAsset! cursor: String! } ``` ### `node` [`OrderingAsset`](/graphql/ordering/ordering-asset) - The asset object containing all asset details. ### `cursor` `String` - A unique cursor value for this edge. Use this value as the `after` parameter in subsequent queries to fetch the next page of results. > **Warning** > > Cursor values should be treated as opaque identifiers. Their format is subject to change and should not be parsed or manipulated. --- # OrderingQuery.draftOrders() Source: https://docs.sibipro.com/graphql/ordering/list-draft-orders > **Deprecated** > > This query is deprecated and will be removed. Keep the draft order `id` returned when you create a draft > and retrieve the draft by id. Only unplaced drafts in your organization are searchable here. The query > continues to work until it is removed. ```graphql type OrderingQuery { draftOrders(searchTerm: String, first: Int = 10, offset: Int = 0): OrderingDraftOrdersConnection! @deprecated(reason: "This query will be removed.") } ``` ## Input ### `searchTerm` `string | undefined` - An optional search term to filter draft orders. ### `first` `number` - The number of draft orders to return. Defaults to 10. ### `offset` `number` - The number of draft orders to skip before returning results. Defaults to 0. ## Response ### `OrderingDraftOrdersConnection` ```graphql type OrderingDraftOrdersConnection { edges: [OrderingDraftOrdersEdge!]! } ``` --- ### `edges` `OrderingDraftOrdersEdge[]` - An array of draft order edges. --- ### `OrderingDraftOrdersEdge` ```graphql type OrderingDraftOrdersEdge { node: OrderingDraftOrder! } ``` --- ### `node` [`OrderingDraftOrder`](/graphql/ordering/get-draft-order#orderingdraftorder) - The draft order. --- # OrderingQuery.orders() Source: https://docs.sibipro.com/graphql/ordering/list-orders > **Deprecated** > > This query is deprecated. Use the REST endpoint > [`GET /orders`](/api-reference/orders/operations/list-orders) instead. It returns the same orders, with > cursor pagination and filters, and is the supported way to list orders. The query continues to work while > integrations move to REST. ```graphql type OrderingQuery { orders(after: String): OrderingOrdersConnection! @deprecated(reason: "Use the REST endpoint GET https://api.sibipro.com/orders instead.") } ``` Returns a list of all orders for the authenticated organization. ## Input ### `after` (optional) `String` - A cursor value used for pagination. When provided, the query returns orders after the specified cursor. To paginate through results, use the `cursor` value from the last edge of the previous response. **Example:** ```graphql query GetOrders { ordering { orders(after: "eyJpZCI6IjEyMyJ9") { edges { cursor node { id } } } } } ``` ## Response ### `OrderingOrdersConnection` [`OrderingOrdersConnection`](#orderingordersconnection) - A connection object containing a list of orders. ## `OrderingOrdersConnection` ```graphql type OrderingOrdersConnection { edges: [OrderingOrdersEdge!]! } ``` ### `edges` [`OrderingOrdersEdge[]`](#orderingordersedge) - An array of edges, each containing an order node. ## `OrderingOrdersEdge` ```graphql type OrderingOrdersEdge { node: OrderingOrder! cursor: String! } ``` ### `node` [`OrderingOrder`](/graphql/ordering/ordering-order) - The order object containing all order details. ### `cursor` `String` - A unique cursor value for this edge. Use this value as the `after` parameter in subsequent queries to fetch the next page of results. > **Warning** > > Cursor values should be treated as opaque identifiers. While they may appear numeric in the current implementation, > their format is subject to change and should not be parsed or manipulated. ## Pagination The `orders` query uses cursor-based pagination, allowing you to efficiently paginate through large sets of orders. Each edge in the response includes a `cursor` field that can be used to fetch the next set of results. ### How It Works 1. Make an initial query without the `after` parameter to get the first page of results 2. Extract the `cursor` value from the last edge in the response 3. Use that `cursor` as the `after` parameter in your next query to fetch the next page 4. Repeat until you've retrieved all the orders you need ### Example: Paginating Through Orders **Initial Request (First Page):** ```graphql query GetFirstPageOfOrders { ordering { orders { edges { cursor node { id status createdAt } } } } } ``` **Response:** ```json { "data": { "ordering": { "orders": { "edges": [ { "cursor": "1", "node": { "id": "order-123", "status": "Delivered", "createdAt": "2024-01-15T10:30:00Z" } }, { "cursor": "2", "node": { "id": "order-124", "status": "In_Transit", "createdAt": "2024-01-16T14:20:00Z" } } ] } } } } ``` **Subsequent Request (Next Page):** ```graphql query GetNextPageOfOrders { ordering { orders(after: "2") { edges { cursor node { id status createdAt } } } } } ``` This will return the next set of orders after the cursor value "2". --- # OrderingQuery.products() Source: https://docs.sibipro.com/graphql/ordering/list-products > **Deprecated** > > This query is deprecated. Use the REST endpoint > [`GET /products`](/api-reference/products/operations/get) instead. It returns the same products, with > availability and pricing, and is the supported way to look up products. The query continues to work while > integrations move to REST. ```graphql type OrderingQuery { products(address: OrderingAddressInput, manufacturer: String!, skus: [String!]!): [OrderingProduct]! @deprecated(reason: "Use the REST endpoint GET https://api.sibipro.com/products instead.") } ``` ## Input ### `address` [`OrderingAddressInput`](/graphql/ordering/ordering-address) - The address associated with the order. Optional. If provided, the address must be a valid address — if it is not valid, the query will fail with an error. If the address is valid but we don't already have a property for it, then a property will be created and assigned to the organization the calling credentials belong to. If omitted, availability will return a status of `UNKNOWN` and a quantity of 0. ### `manufacturer` `string` - The manufacturer of the products to search for. (example: 'ge', 'msi') ### `skus` `string[]` - List of SKUs to search for. If a product cannot be found for a given sku, the response will contain a null in the corresponding index. ## Response ### `OrderingProduct` [`OrderingProduct[]`](#orderingproduct) - List of products matching the input skus criteria. If a product cannot be found for a given sku, the response will contain a null in the corresponding index. ## `OrderingProduct` ```graphql type OrderingProduct { sku: String! manufacturer: String! title: String! subtitle: String description: String category: String! subcategories: [String!]! color: String @deprecated(reason: "Use attributes instead.") attributes: [OrderingProductAttribute!]! viewUrl: String! availability: OrderingAvailability! imageUrl: String! imageUrls: [String!]! priceCents: Int! msrpPriceCents: Int addons: [OrderingProductAddon!]! dimensions: OrderingProductDimensions! baseUnitOfMeasure: String! unitsOfMeasure: [OrderingProductUnitOfMeasure!]! recommendedParts: [OrderingProductPart!]! availableFulfillmentMethods: [OrderingProductFulfillmentMethod!]! warranties: [OrderingProductWarranty!]! options: [OrderingProductOption!]! id: ID! @deprecated(reason: "Use sku instead.") } ``` ### `sku` `string` - The SKU of the product. Is defined by the manufacturer or distributor. --- ### `manufacturer` `string` - The manufacturer of the product. This value is valid for use in the `manufacturer` field of all input types that accept a manufacturer. --- ### `title` `string` - The human readable name of the product. --- ### `subtitle` `string | null` - A short description of the product. --- ### `description` `string | null` - A brief description of the product. Will be `null` when not available. --- ### `category` `string` - The broad category this product falls into. --- ### `subcategories` `string[]` - Array of strings of all the specific subcategories this product falls into. May be empty and may also be 1:1 with `category` --- ### `color` (deprecated) `string | null` - **Deprecated.** Read the `color` entry of [`attributes`](#attributes) instead. The color of the product. Is not available for all products. --- ### `attributes` [`OrderingProductAttribute[]`](/graphql/ordering/ordering-product-attribute) - The catalog attributes of this product that are relevant to ordering it, as `{ name, value }` pairs — e.g. `sheen` or `color`. Which attributes a product carries varies by product; empty when it has none. --- ### `viewUrl` `string` - A URL to view the product in the Sibi Web UI. --- ### `availability` [`OrderingAvailability`](#orderingavailability) - The availability of the product. Returns a status of 'UNKNOWN' and a quantity of 0 if the address is missing. --- ### `imageUrl` `string` - The URL of the product's image. --- ### `imageUrls` `string[]` - The URLs of all of the product's images, with the primary image (the same image returned by `imageUrl`) always first. --- ### `priceCents` `number` - The price of the product in cents, per base unit (denominated in `baseUnitOfMeasure`). --- ### `msrpPriceCents` `number | null` - The Manufacturer's Suggested Retail Price of the product in cents. Is not available for all products. Will be `null` when not available. --- ### `addons` [`OrderingProductAddon`](/graphql/ordering/ordering-order-product#orderingproductaddon)\[] - An array of addons (services and/or accessories) that can be ordered with the product. --- ### `dimensions` [`OrderingProductDimensions`](#orderingproductdimensions) - The physical dimensions of the product. --- ### `baseUnitOfMeasure` `string` - The unit this product's `priceCents` is denominated in (e.g. "Each", "Sq Ft"). When `unitsOfMeasure` is non-empty, the product cannot be purchased in fractional amounts of this base unit directly — pass one of `unitsOfMeasure`'s `unitOfMeasure` values as `unitOfMeasure` when calling `reviewOrder` or `createOrder`. When `unitsOfMeasure` is empty, pass this value instead (or omit `unitOfMeasure` to default to it). --- ### `unitsOfMeasure` [`OrderingProductUnitOfMeasure[]`](#orderingproductunitofmeasure) - Alternate purchasable units for this product — e.g. a flooring product priced by the `Sq Ft` that can only be ordered by the `Box` or `Pallet`, each covering a fixed quantity of `baseUnitOfMeasure` (see `quantityPerBaseUnit`). Empty when the product has no alternate units and can be ordered directly in `baseUnitOfMeasure`. --- ### `recommendedParts` [`OrderingProductPart[]`](#orderingproductpart) - An array of products that can be purchased with the parent. Will include things like power cables for electric ranges or ice makers for refrigerators. Some of these parts are included with addons. For example, an electric range's "Install" addon will generally include the power cable part. --- ### `availableFulfillmentMethods` [`OrderingProductFulfillmentMethod[]`](/graphql/ordering/ordering-product-fulfillment-method) - The fulfillment methods available for this product, each showing the earliest date it can be fulfilled and the distribution center that provides that date. Each method also carries the full set of distribution centers that can fulfill this product by that method, each with its own estimated fulfillment date, in [`distributionCenters`](/graphql/ordering/ordering-product-fulfillment-method#distributioncenters) — sorted earliest first, so the top-level `estimatedFulfillmentDate` and `distributionCenter` correspond to its first entry. Use that list when you need to offer a choice of distribution center rather than defaulting to the earliest. Returns an empty array when no address is provided or when fulfillment information is unavailable. --- ### `warranties` [`OrderingProductWarranty[]`](/graphql/ordering/ordering-product-warranty) - The extended-warranty products that can be purchased alongside this product. Returns an empty array when no address is provided or when no warranty coverage is available for the product. --- ### `options` [`OrderingProductOption[]`](#orderingproductoption) - The selectable option values for this product — e.g. the standard color palette of a PPG tintable paint, one entry per color. Entries sharing a `key` are alternative values for the same option. Empty for products with no selectable options. Some products have an option that must be selected at order time (e.g. PPG tintable paints) — one of its `{ key, value }` pairs must be included in `products[].options`, and omitting it is rejected with an `INVALID_PRODUCT_OPTIONS` error — when calling [`reviewOrder`](/graphql/ordering/review-order) or [`createOrder`](/graphql/ordering/create-order). This list holds each option's standard values; other valid values may exist beyond it (e.g. the full PPG color catalog), and any valid value identifier is accepted at order time. ```graphql query { ordering { products(manufacturer: "ppg", skus: ["ppg-interior-paint-1gal"]) { sku title options { key value name hex } } } } ``` --- ### `id` (deprecated) `string` - **Deprecated.** Use [`sku`](#sku) to identify products instead. --- ## `OrderingAvailability` ```graphql type OrderingAvailability { status: OrderingAvailabilityStatus! quantity: Int! distributionCenters: [OrderingDistributionCenterAvailability!]! } ``` ### `status` `OrderingAvailabilityStatus` - The availability status of the product. One of `IN_STOCK`, `OUT_OF_STOCK`, `UNAVAILABLE`, or `UNKNOWN`. The value of `status` reflects local availability for the address provided, or `UNKNOWN` if no address was given. ### `quantity` `number` - The quantity of the product that is available at the closest distribution center to the property that has the product available. ### `distributionCenters` [`OrderingDistributionCenterAvailability[]`](#orderingdistributioncenteravailability) - Per-distribution-center availability breakdown. Each entry represents a distribution center that carries this product. Only populated when an address is provided. Returns an empty array when distribution center information is unavailable. --- ## `OrderingDistributionCenterAvailability` ```graphql type OrderingDistributionCenterAvailability { status: OrderingAvailabilityStatus! quantity: Int! distributionCenter: OrderingDistributionCenter! distributionCenterId: ID! @deprecated(reason: "Use distributionCenter { id } instead.") distributionCenterLatitude: Float @deprecated(reason: "Use distributionCenter { latitude } instead.") distributionCenterLongitude: Float @deprecated(reason: "Use distributionCenter { longitude } instead.") distributionCenterAddress: OrderingAddress! @deprecated(reason: "Use distributionCenter { address } instead.") } ``` ### `status` `OrderingAvailabilityStatus` - The availability status of the product at this distribution center. One of `IN_STOCK`, `OUT_OF_STOCK`, `UNAVAILABLE`, or `UNKNOWN`. ### `quantity` `number` - The quantity of the product available at this distribution center. ### `distributionCenter` [`OrderingDistributionCenter`](#orderingdistributioncenter) - The distribution center where this product is available. Use `distributionCenter { id }` when calling `reviewOrder` or `createOrder` to specify a distribution center. ### `distributionCenterId` (deprecated) `string` - **Deprecated.** Use `distributionCenter { id }` instead. ### `distributionCenterLatitude` (deprecated) `number | null` - **Deprecated.** Use `distributionCenter { latitude }` instead. ### `distributionCenterLongitude` (deprecated) `number | null` - **Deprecated.** Use `distributionCenter { longitude }` instead. ### `distributionCenterAddress` (deprecated) [`OrderingAddress`](/graphql/ordering/ordering-address) - **Deprecated.** Use `distributionCenter { address }` instead. --- ## `OrderingDistributionCenter` ```graphql type OrderingDistributionCenter { id: ID! name: String! latitude: Float longitude: Float address: OrderingAddress! imageUrl: String storeNumber: String! phone: String } ``` ### `id` `string` - The distribution center's unique identifier. Use this when placing orders at a specific DC. ### `name` `string` - The name of the distribution center. ### `latitude` `number | null` - The latitude of the distribution center's location. ### `longitude` `number | null` - The longitude of the distribution center's location. ### `address` [`OrderingAddress`](/graphql/ordering/ordering-address) - The address of the distribution center. ### `imageUrl` `string | null` - The URL of the distribution center's logo. ### `storeNumber` `string` - The store number of the distribution center. May not actually be numeric. --- ### `phone` `string | undefined` - The phone number of the distribution center, as the distributor publishes it. Absent when the distributor has not provided one. --- ## `OrderingProductDimensions` ```graphql type OrderingProductDimensions { length: Float lengthUnit: String width: Float widthUnit: String height: Float heightUnit: String depth: Float depthUnit: String } ``` A product reports its front-to-back extent under either `depth` or `length` depending on its manufacturer's convention — most appliances report `depth`, most HVAC equipment reports `length` — not both. ### `length` `number | null` - The numerical length value. Will be null if not available. ### `lengthUnit` `string | null` - The unit of measurement for length (e.g., "inch"). Will be null if not available. ### `width` `number | null` - The numerical width value. Will be null if not available. ### `widthUnit` `string | null` - The unit of measurement for width (e.g., "inch"). Will be null if not available. ### `height` `number | null` - The numerical height value. Will be null if not available. ### `heightUnit` `string | null` - The unit of measurement for height (e.g., "inch"). Will be null if not available. ### `depth` `number | null` - The numerical depth value. Will be null if not available. ### `depthUnit` `string | null` - The unit of measurement for depth (e.g., "inch"). Will be null if not available. --- ## `OrderingProductUnitOfMeasure` ```graphql type OrderingProductUnitOfMeasure { unitOfMeasure: String! quantityPerBaseUnit: Float! } ``` An alternate purchasable unit for a product, and how it converts to the product's `baseUnitOfMeasure`. See [`OrderingProduct.unitsOfMeasure`](#unitsofmeasure). ### `unitOfMeasure` `string` - The unit to pass as `unitOfMeasure` when calling `reviewOrder` or `createOrder` to purchase this product in this unit (e.g. "Box", "Pallet"). ### `quantityPerBaseUnit` `number` - The number of `baseUnitOfMeasure` contained in each of this unit (e.g. 23.77 sq ft per box). Multiply by the requested quantity of this unit to get the total in the base unit. ## `OrderingProductOption` ```graphql type OrderingProductOption { key: String! value: String! name: String! title: String! @deprecated(reason: "Use name instead.") hex: String } ``` A value a product's selectable option can be set to — e.g. one paint color. To select it, pass its `{ key, value }` in `products[].options` when calling [`reviewOrder`](/graphql/ordering/review-order) or [`createOrder`](/graphql/ordering/create-order). Entries sharing a `key` are alternative values for the same option. The same type is echoed on reviewOrder responses as the selection on each product line — see [`OrderingOrderProduct.options`](/graphql/ordering/ordering-order-product#options). ### `key` `string` - The option identifier (e.g. `"ppg-paint-color"`). Pass this as `options[].key` when calling `reviewOrder` or `createOrder`. ### `value` `string` - The value identifier (e.g. the PPG color code `"PPG1105-3"`). Pass this as `options[].value` when calling `reviewOrder` or `createOrder`. ### `name` `string` - The human readable name of the value (e.g. the paint color name "Delicate White"). ### `title` (deprecated) `string` - **Deprecated.** Use `name` instead. ### `hex` `string | null` - The CSS hex color (`#RRGGBB`) of this value, for values that represent a color (e.g. a paint color). Will be `null` when the value has no color representation. --- ## `OrderingProductPart` ```graphql type OrderingProductPart { sku: String! title: String! category: String! priceCents: Int! } ``` ### `sku` `string` - The SKU of the part. It is defined by the manufacturer or distributor. ### `title` `string` - The human readable name of the part. ### `category` `string` - The broad category this part falls into. ### `priceCents` `number` - The price of the part in cents. --- # OrderingAddress Source: https://docs.sibipro.com/graphql/ordering/ordering-address There are two nearly-identical address types in the Ordering API: - **`OrderingAddressInput`** (input type) - Used when **sending** address data to queries and mutations - **`OrderingAddress`** (type) - Used when **receiving** address data in responses Both types have the same structure and fields. The distinction is a GraphQL convention where input types are used for arguments and output types are used for return values. ## `OrderingAddressInput` ```graphql input OrderingAddressInput { line1: String! line2: String city: String! stateOrProvince: String! postalCode: String! country: String } ``` ### `line1` `string` - The first line of the street address (e.g., "123 Main St"). --- ### `line2` `string | null` - The second line of the street address (e.g., "Apt 4B"). Optional. --- ### `city` `string` - The city name. --- ### `stateOrProvince` `string` - The state or province (e.g., "CA", "Ontario"). --- ### `postalCode` `string` - The postal or ZIP code. --- ### `country` `string | null` - The country. Optional. --- ### Usage Notes - `reviewOrder()` will only return valid addresses for properties registered with SIBI - If an invalid address is passed to `reviewOrder()`, the query will fail with an error - When an address is valid but a property doesn't exist for it yet, a property will be created and assigned to the organization the calling credentials belong to ## `OrderingAddress` ```graphql type OrderingAddress { line1: String! line2: String city: String! stateOrProvince: String! postalCode: String! country: String } ``` This type has identical fields to `OrderingAddressInput` and is returned in query responses (e.g., `OrderingOrder.propertyAddress`). --- # OrderingAsset Source: https://docs.sibipro.com/graphql/ordering/ordering-asset An asset installed at a property, purchased through Sibi. ```graphql type OrderingAsset { id: ID! createdAt: String! manufacturer: String! viewUrl: String! name: String! sku: String! serialNumber: String category: String! subcategories: [String!]! returned: Boolean! poNumber: String orderId: String propertyAddress: OrderingAddress! property: OrderingAssetProperty! dimensions: OrderingAssetDimensions! warrantyCoverages: [OrderingWarrantyCoverage!]! } ``` ### `id` `string` - Sibi-assigned identifier. Uniquely identifies this asset. --- ### `createdAt` `string` - When the asset was created, in ISO 8601 format. --- ### `manufacturer` `string` - A slug identifying which shop the product was purchased from. --- ### `viewUrl` `string` - Link to view the asset in Sibi's web interface. --- ### `name` `string` - Human-readable product name. --- ### `sku` `string` - Manufacturer's product identifier. --- ### `serialNumber` `string | null` - Defined by the manufacturer and sometimes provided at invoice time. --- ### `category` `string` - Broad product category. --- ### `subcategories` `string[]` - Specific subcategories the product belongs to. May be empty. --- ### `returned` `boolean` - True if this asset has been returned. --- ### `poNumber` `string | null` - External purchase order number provided with the invoice. --- ### `orderId` `string | null` - Unique identifier for the order associated with this asset within Sibi. --- ### `propertyAddress` [`OrderingAddress`](/graphql/ordering/ordering-address) - The address of the property this asset is installed at. --- ### `property` [`OrderingAssetProperty`](/graphql/ordering/ordering-asset-property) - The property this asset is installed at. --- ### `dimensions` [`OrderingAssetDimensions`](/graphql/ordering/ordering-asset-dimensions) - Product measurements. Omits dimensions the product does not report. --- ### `warrantyCoverages` [`OrderingWarrantyCoverage[]`](/graphql/ordering/ordering-warranty-coverage) - Time-sliced warranty coverage windows for this asset. --- # OrderingAssetDimensions Source: https://docs.sibipro.com/graphql/ordering/ordering-asset-dimensions Product measurements for an asset. Omits dimensions the underlying product does not report — each `` / `Unit` pair is either both present or both null. ```graphql type OrderingAssetDimensions { height: Float heightUnit: String width: Float widthUnit: String depth: Float depthUnit: String length: Float lengthUnit: String } ``` ### `height` / `heightUnit` `number | null` / `string | null` - The product's height and its unit of measure (e.g., `"in"`). --- ### `width` / `widthUnit` `number | null` / `string | null` - The product's width and its unit of measure. --- ### `depth` / `depthUnit` `number | null` / `string | null` - The product's depth and its unit of measure. --- ### `length` / `lengthUnit` `number | null` / `string | null` - The product's length and its unit of measure. --- # OrderingAssetProperty Source: https://docs.sibipro.com/graphql/ordering/ordering-asset-property The property an asset is installed at. ```graphql type OrderingAssetProperty { externalId: String } ``` ### `externalId` `string | null` - User-defined identifier for the property. --- # OrderingCustomerContactInfoInput Source: https://docs.sibipro.com/graphql/ordering/ordering-customer-contact-info-input ## `email` `string` --- ## `firstName` `string` --- ## `lastName` `string` --- ## `phone` `string` --- # OrderingCustomerContactInfoPartialInput Source: https://docs.sibipro.com/graphql/ordering/ordering-customer-contact-info-partial-input ## `email` `string` --- ## `firstName` `string | null` --- ## `lastName` `string | null` --- ## `phone` `string | null` --- # OrderingDeliveryContact Source: https://docs.sibipro.com/graphql/ordering/ordering-delivery-contact An object representing the delivery agent assigned to an order. ```graphql type OrderingDeliveryContact { name: String! phone: String email: String } ``` ### `name` `string` - The name of the delivery agent. --- ### `phone` `string | null` - The phone number of the delivery agent. Will be null when not available. --- ### `email` `string | null` - The email address of the delivery agent. Will be null when not available. --- # OrderingDistributionCenterFulfillmentAvailability Source: https://docs.sibipro.com/graphql/ordering/ordering-distribution-center-fulfillment-availability A distribution center's availability for a specific fulfillment method, including the estimated date this product can be fulfilled from that distribution center. Returned in [`OrderingProductFulfillmentMethod.distributionCenters`](/graphql/ordering/ordering-product-fulfillment-method#distributioncenters). ```graphql type OrderingDistributionCenterFulfillmentAvailability { estimatedFulfillmentDate: String! distributionCenter: OrderingDistributionCenter! } ``` ### `estimatedFulfillmentDate` `string` - The estimated date this product can be fulfilled from this distribution center using this method. Formatted as `YYYY-MM-DD`. --- ### `distributionCenter` [`OrderingDistributionCenter`](/graphql/ordering/search-products#orderingdistributioncenter) - The distribution center that can fulfill the product by this date. Pass `distributionCenter { id }` as `distributionCenterId` when calling [`reviewOrder`](/graphql/ordering/review-order) or [`createOrder`](/graphql/ordering/create-order) to place the order at this location. --- # OrderingOrder Source: https://docs.sibipro.com/graphql/ordering/ordering-order An object representing an order placed through the ordering API. ```graphql type OrderingOrder { id: ID! poNumber: String viewUrl: String! createdAt: String! propertyAddress: OrderingAddress! fulfillmentMethod: OrderingFulfillmentMethodType! requestedFulfillmentDate: String! estimatedFulfillmentDate: String! fulfillmentTimeStart: String fulfillmentTimeEnd: String actualFulfillmentDate: String status: OrderingOrderStatus! statusDetail: String lineItems: [OrderingOrderLineItem!]! fees: [OrderingOrderFee!]! exceptions: [OrderingOrderException!]! deliveryContact: OrderingDeliveryContact orderingUser: OrderingUser! images: [OrderingOrderImage!]! confirmationNumbers: [OrderingOrderConfirmationNumber!]! cancellationRequest: OrderingOrderCancellationRequest } ``` ### `id` `string` - The unique identifier for the order. --- ### `poNumber` `string | null` - Purchase order number associated with this order. Defined by the person that placed the order. Is null when not available. --- ### `viewUrl` `string` - A URL to view the order in the Sibi Web UI. --- ### `createdAt` `string` - The timestamp when the order was created in ISO 8601 format. --- ### `propertyAddress` [`OrderingAddress`](/graphql/ordering/ordering-address) - The property address associated with this order. Broken down into separate string fields line1, line2, city, stateOrProvince, postalCode. If the address doesn't have a line2, it will return a value of null. --- ### `fulfillmentMethod` `OrderingFulfillmentMethodType` - The fulfillment method for the order (e.g., delivery or pickup). --- ### `requestedFulfillmentDate` `string` - The date when the order is requested to be fulfilled in ISO 8601 format. --- ### `estimatedFulfillmentDate` `string` - The estimated fulfillment date for the order in ISO 8601 format. Will return the fulfillment date from the distributor if available, falls back to the requestedFulfillmentDate. --- ### `fulfillmentTimeStart` `string | null` - The start of the time window when the order is requested to be fulfilled in ISO 8601 format in UTC. --- ### `fulfillmentTimeEnd` `string | null` - The end of the time window when the order is requested to be fulfilled in ISO 8601 format in UTC. --- ### `actualFulfillmentDate` `string | null` - The timestamp when the order was fulfilled (transitioned to Delivered or Picked_Up) in ISO 8601 format in UTC. Will be null when the order has not been fulfilled yet. --- ### `status` [`OrderingOrderStatus`](/graphql/ordering/ordering-order-status) - The status of the order. --- ### `statusDetail` `string | null` - The status detail of the order. Provides additional context about the current status. Will be null when not available. --- ### `lineItems` [`OrderingOrderLineItem[]`](/graphql/ordering/ordering-order-line-item) - The line items associated with this order. --- ### `fees` [`OrderingOrderFee[]`](/graphql/ordering/ordering-order-fee) - A list of fees associated with the order. --- ### `exceptions` [`OrderingOrderException[]`](/graphql/ordering/ordering-order-exception) - A list of exceptions that occurred during order processing. May be empty if no exceptions occurred. --- ### `deliveryContact` [`OrderingDeliveryContact`](/graphql/ordering/ordering-delivery-contact) - The delivery agent assigned to the order. Will be null when not available. --- ### `orderingUser` [`OrderingUser`](/graphql/ordering/ordering-user) - The user who placed the order. --- ### `images` [`OrderingOrderImage[]`](/graphql/ordering/ordering-order-image) - A list of images associated with the order. --- ### `confirmationNumbers` [`OrderingOrderConfirmationNumber[]`](/graphql/ordering/ordering-order-confirmation-number) - An array of confirmation numbers objects. Multiple confirmation numbers are usually an indication that the order has been split into multiple shipments. --- ### `cancellationRequest` [`OrderingOrderCancellationRequest | null`](/graphql/ordering/ordering-order-cancellation-request) - The cancellation request associated with the order. Will be null when not available. --- # OrderingOrderCancellationRequest Source: https://docs.sibipro.com/graphql/ordering/ordering-order-cancellation-request An object representing a cancellation request for an order. This type is returned as part of the [`OrderingOrder`](/graphql/ordering/ordering-order) type. ```graphql type OrderingOrderCancellationRequest { status: OrderingOrderCancellationRequestStatus! reason: String! createdAt: String! updatedAt: String! } ``` ### `status` [`OrderingOrderCancellationRequestStatus`](/graphql/ordering/ordering-order-cancellation-request-status) - The status of the cancellation request. --- ### `reason` `string` - The reason for the cancellation request. --- ### `createdAt` `string` - The timestamp when the cancellation request was created in ISO 8601 format. --- ### `updatedAt` `string` - The timestamp when the cancellation request was last updated in ISO 8601 format. --- ## Related Events When cancellation requests are created or updated, webhook events are triggered. See [Order Cancellation Requests](/events/order.cancellation-requests) for more information about these events. --- # OrderingOrderCancellationRequestStatus Source: https://docs.sibipro.com/graphql/ordering/ordering-order-cancellation-request-status An enum representing the possible statuses of an order cancellation request. ```graphql enum OrderingOrderCancellationRequestStatus { Pending Approved Denied } ``` ### `Pending` The cancellation request is pending approval. --- ### `Approved` The cancellation request has been approved. --- ### `Denied` The cancellation request has been denied. --- # OrderingOrderConfirmationNumber Source: https://docs.sibipro.com/graphql/ordering/ordering-order-confirmation-number An object representing a confirmation number from a fulfillment partner. ```graphql type OrderingOrderConfirmationNumber { value: String! } ``` ### `value` `string` - The value of the confirmation number. Confirmation numbers are a reference number from a fulfillment partner that enable you to track your order. They are issued when we submit the order to the partner. --- # OrderingOrderException Source: https://docs.sibipro.com/graphql/ordering/ordering-order-exception An object representing an exception that occurred during order processing. ```graphql type OrderingOrderException { createdAt: String! sku: String message: String! category: String } ``` ### `createdAt` `string` - The timestamp when the exception occurred in ISO 8601 format. --- ### `sku` `string | null` - The SKU associated with the exception, if applicable. Note that this may be a distributor SKU that doesn't exist in the SIBI system. Will be null when not available or not applicable. --- ### `message` `string` - A description of the exception that occurred. --- ### `category` `string | null` - The category of the exception. Category will be null for now. As we add new categories we will update this documentation. --- # OrderingOrderFee Source: https://docs.sibipro.com/graphql/ordering/ordering-order-fee An object representing a fee associated with an order. ```graphql type OrderingOrderFee { name: String! amountCents: Int! } ``` ### `name` `string` - Human readable name of the fee. --- ### `amountCents` `number` - The amount of the fee, represented in cents. --- # OrderingOrderImage Source: https://docs.sibipro.com/graphql/ordering/ordering-order-image An object representing an image associated with an order. ```graphql type OrderingOrderImage { url: String! } ``` ### `url` `string` - The URL of the image. --- # OrderingOrderLineItem Source: https://docs.sibipro.com/graphql/ordering/ordering-order-line-item An object representing a line item in an order. ```graphql type OrderingOrderLineItem { sku: String! name: String! quantity: Int! unitOfMeasure: String! unitPriceCents: Int! totalPriceCents: Int! options: [OrderingProductOption!]! } ``` ### `sku` `string` - The stock-keeping unit (SKU) identifier for the product ordered in this line item. --- ### `name` `string` - The human readable name of the product ordered in this line item. --- ### `quantity` `number` - The number of units purchased for this item. --- ### `unitOfMeasure` `string` - The unit of measurement for this item (e.g., EA for each). --- ### `unitPriceCents` `number` - The price per unit of the item, represented in cents. --- ### `totalPriceCents` `number` - The total price for the line item, accounting for the quantity and unit price, represented in cents. --- ### `options` [`OrderingProductOption[]`](/graphql/ordering/ordering-order-product#orderingproductoption) - The option values (e.g. paint color) this line item was ordered with. Empty when the product has no selectable options. `hex` is resolved from the product catalog at read time for values that represent a color, and may be `null` if the value has no color representation or can no longer be found in the catalog. --- # OrderingOrderProduct Source: https://docs.sibipro.com/graphql/ordering/ordering-order-product An object representing a product in an order. ```graphql type OrderingOrderProduct { sku: String! quantity: Int! unitOfMeasure: String! quantityPerUnit: Float! @deprecated(reason: "Use quantityPerBaseUnit instead.") quantityPerBaseUnit: Float! baseUnitOfMeasure: String! name: String! subtitle: String imageUrl: String! priceCents: Int! availabilityStatus: OrderingProductAvailabilityStatus! addons: [OrderingProductAddon!]! availableAddons: [OrderingProductAddon!]! options: [OrderingProductOption!]! attributes: [OrderingProductAttribute!]! availableWarranties: [OrderingProductWarranty!]! selectedWarranty: OrderingProductWarranty } ``` ### `sku` `string` - The SKU of the product. Is defined by the manufacturer or distributor. --- ### `quantity` `number` - The quantity of the product being purchased in the order. --- ### `unitOfMeasure` `string` - The unit of measure for the product (e.g. "each", "case"). --- ### `quantityPerUnit` (deprecated) `number` - **Deprecated.** Use `quantityPerBaseUnit` instead. Returns the same value under a less explicit name. --- ### `quantityPerBaseUnit` `number` - The number of `baseUnitOfMeasure` contained in each `unitOfMeasure` (e.g. 23.77 sq ft per box). Multiply by `quantity` to get the total in the base unit. Replaces the deprecated `quantityPerUnit`. --- ### `baseUnitOfMeasure` `string` - The base unit of measure for the product (e.g. "each"). --- ### `name` `string` - The human readable name of the product. --- ### `subtitle` `string | undefined` - The subtitle of the product. Usually contains a brief description. --- ### `imageUrl` `string` - The URL of the product's image. --- ### `priceCents` `number` - The price in cents, per base unit (denominated in `baseUnitOfMeasure`). --- ### `availabilityStatus` [`OrderingProductAvailabilityStatus`](#orderingproductavailabilitystatus) - The availability status of the product in the chosen distribution center, or the automatically chosen distribution center if none was specified. --- ### `addons` [`OrderingProductAddon`](#orderingproductaddon)\[] - An array of addons that are included with the product. --- ### `availableAddons` [`OrderingProductAddon`](#orderingproductaddon)\[] - An array of addons that are available for the product. --- ### `options` [`OrderingProductOption[]`](#orderingproductoption) - The option values (e.g. paint color) selected for this product line. The available values for a product are listed on the products API — see [`OrderingProduct.options`](/graphql/ordering/list-products#options). --- ### `attributes` [`OrderingProductAttribute[]`](/graphql/ordering/ordering-product-attribute) - The catalog attributes of this product that are relevant to ordering it, as `{ name, value }` pairs — e.g. `sheen` or `color`. Which attributes a product carries varies by product; empty when it has none. --- ### `availableWarranties` [`OrderingProductWarranty[]`](/graphql/ordering/ordering-product-warranty) - The extended-warranty products that can be purchased alongside this equipment line. Empty when no warranty coverage is available for the product. --- ### `selectedWarranty` [`OrderingProductWarranty`](/graphql/ordering/ordering-product-warranty)` | null` - The warranty attached to this product on this request — either from an explicit `warrantySku` on the product input or the auto-pick when the per-product `applyWarrantyCoverage` is true. `null` when no warranty is attached to this line. At most one warranty per product. --- ## `OrderingProductAvailabilityStatus` ```graphql enum OrderingProductAvailabilityStatus { IN_STOCK OUT_OF_STOCK SUBSTITUTION_ONLY UNAVAILABLE UNKNOWN } ``` ### `IN_STOCK` The product is in stock and available for ordering. ### `OUT_OF_STOCK` The product is currently out of stock. ### `SUBSTITUTION_ONLY` The product is only available as a substitution. ### `UNAVAILABLE` The product is unavailable for ordering. ### `UNKNOWN` The availability status is unknown, typically because no address was provided. --- ## `OrderingProductOption` ```graphql type OrderingProductOption { key: String! value: String! name: String! title: String! @deprecated(reason: "Use name instead.") hex: String } ``` The same type lists the available option values on the products API — see [`OrderingProduct.options`](/graphql/ordering/list-products#options). Here it carries the values selected for this product line. ### `key` `string` - The option identifier (e.g. `"ppg-paint-color"`). ### `value` `string` - The selected value identifier (e.g. the PPG color code `"PPG1105-3"`). ### `name` `string` - The human readable name of the value (e.g. the paint color name "Delicate White"). ### `title` (deprecated) `string` - **Deprecated.** Use `name` instead. ### `hex` `string | null` - The CSS hex color (`#RRGGBB`) of this value, for values that represent a color (e.g. a paint color). Will be `null` when the value has no color representation. --- ## `OrderingProductAddon` ```graphql type OrderingProductAddon { id: ID! title: String! priceCents: Int! products: [OrderingProductAddonProduct!]! } ``` ### `id` `string` - Sibi identifier for the addon. ### `title` `string` - The human readable name of the addon. ### `priceCents` `number` - The price of the addon in cents. ### `products` [`OrderingProductAddonProduct`](#orderingproductaddonproduct) - The individual products that are included with each addon. These are the skus that the distributor will reference on their invoices. ## `OrderingProductAddonProduct` ```graphql type OrderingProductAddonProduct { sku: String! title: String! category: String! priceCents: Int! } ``` ### `sku` `string` - The sku that the distributor will reference on their invoices. For addons within the GE shop, these skus will generally have the format of MXXX where XXX is numeric. ### `title` `string` - The human readable name of the product. ### `category` `string` - The broad category this product falls into. ### `priceCents` `number` - The price of the product in cents. --- # OrderingOrderProductInput Source: https://docs.sibipro.com/graphql/ordering/ordering-order-product-input ## `sku` `string` - The SKU of the product to order. --- ## `addonIds` `string[]` - The IDs of the addons to order with the product. --- ## `quantity` `number` - The quantity of the product to order. --- ## `unitOfMeasure` `string | null` - The unit to order the product in, for products that are purchased in units other than their base unit (e.g. flooring priced by the `Sq Ft` but ordered by the `Box`). Pass one of the `unitOfMeasure` values from the product's [`unitsOfMeasure`](/graphql/ordering/list-products#unitsofmeasure). If not provided, it will default to ordering a single instance of the product (1 each, 1 sq ft, etc). Note that this may cause the quantity to be rounded up to the nearest whole multiple of the minimum order quantity. --- ## `options` `OrderingProductOptionInput[] | null` - Values for the product's selectable options — e.g. the paint color of a PPG tintable paint. Pass one `{ key, value }` pair per option, taken from one of the entries in the product's [`options`](/graphql/ordering/list-products#options). Any option that must be selected for the product needs to be provided — omitting one, or passing a value that isn't a valid value identifier for the product, is rejected with `INVALID_PRODUCT_OPTIONS`. Note that value validity is currently checked against the product's full set of option values rather than scoped to the specific `key` it's paired with. ```graphql input OrderingProductOptionInput { key: String! value: String! } ``` --- ## `warrantySku` `string | null` - Attach a specific extended-warranty product to this line. Must be one of the warranty SKUs in this product's [`availableWarranties`](/graphql/ordering/ordering-order-product#availablewarranties). Omit (or `null`) to skip explicit warranty selection. Rejected with `WARRANTY_SKU_NOT_AVAILABLE_FOR_PRODUCT` if the SKU isn't a valid warranty option for this product, or `CONFLICTING_WARRANTY_INPUT` if `applyWarrantyCoverage` is `false` on this same product line. --- ## `applyWarrantyCoverage` `boolean | null` - Opt this line into extended-warranty coverage using the default auto-picked warranty for the product. When `true`, the warranty is auto-selected from the product's `availableWarranties`. Rejected with `CONFLICTING_WARRANTY_INPUT` if `warrantySku` is also set on this same line, since those intents contradict each other. Omit (or `null`) to attach no warranty to this line. --- # OrderingOrderStatus Source: https://docs.sibipro.com/graphql/ordering/ordering-order-status An enum representing the possible status values for an order. ```graphql enum OrderingOrderStatus { Approved At_Distribution Canceled Confirmed Delayed Delivered In_Process In_Transit Pending Picked_Up Processed Ready_For_Pickup Returned } ``` The status of the order. Possible values: - **Approved** - The Order was approved. This status is short-lived and quickly transitions to a status of In_Process and Processed. - **At_Distribution** - The Order is at the distribution center. - **Canceled** - The Order has been canceled. This can happen either when a pending Order is canceled, or when an Order is canceled after being placed. - **Confirmed** - The Order has been confirmed by the partner. A confirmation number should be present on the order at this point. - **Delayed** - The Order has been delayed. Delayed orders are quickly resolved. - **Delivered** - The Order has been delivered. - **In_Process** - The Order is in the process of being submitted to the partner. This status is short-lived and quickly transitions to a status of Processed or Delayed. - **In_Transit** - The Order is in transit to the fulfillment address. - **Pending** - The Order still requires approval. At this point, an order can be canceled or approved. - **Picked_Up** - The Order has been picked up from the partner distribution center. - **Processed** - The Order has been successfully processed. - **Ready_For_Pickup** - The Order is ready for pickup at the partner distribution center fulfilling the order. - **Returned** - The Order was returned after it was delivered or picked up. --- # OrderingProductAttribute Source: https://docs.sibipro.com/graphql/ordering/ordering-product-attribute A catalog attribute of a product, as a name/value pair — e.g. `sheen` or `color`. Returned in [`OrderingProduct.attributes`](/graphql/ordering/search-products#attributes) by [`searchProducts`](/graphql/ordering/search-products) and [`products`](/graphql/ordering/list-products), and in [`OrderingOrderProduct.attributes`](/graphql/ordering/ordering-order-product#attributes) by [`reviewOrder`](/graphql/ordering/review-order) and [`createOrder`](/graphql/ordering/create-order). Which attributes a product carries varies by product. ```graphql type OrderingProductAttribute { name: String! value: String! } ``` ### `name` `string` - The attribute's identifier (e.g. `"sheen"`, `"color"`). --- ### `value` `string` - The attribute's value (e.g. `"Satin"`, `"Stainless Steel"`). --- # OrderingProductFulfillmentMethod Source: https://docs.sibipro.com/graphql/ordering/ordering-product-fulfillment-method A way a product can be fulfilled to a given address, along with the earliest date it can be fulfilled and the distribution centers that offer it. Returned in [`OrderingProduct.availableFulfillmentMethods`](/graphql/ordering/search-products#availablefulfillmentmethods) by [`searchProducts`](/graphql/ordering/search-products) and [`products`](/graphql/ordering/list-products). ```graphql type OrderingProductFulfillmentMethod { id: String! name: String! description: String type: OrderingFulfillmentMethodType! estimatedFulfillmentDate: String! distributionCenter: OrderingDistributionCenter! distributionCenters: [OrderingDistributionCenterFulfillmentAvailability!]! } ``` ### `id` `string` - The unique identifier for this fulfillment method. Pass this as `fulfillmentMethodId` when calling [`reviewOrder`](/graphql/ordering/review-order) or [`createOrder`](/graphql/ordering/create-order). --- ### `name` `string` - Human-readable name of the fulfillment method (e.g. "Standard Delivery", "Liftgate Delivery"). --- ### `description` `string | null` - An optional description of the fulfillment method. --- ### `type` [`OrderingFulfillmentMethodType`](/graphql/ordering/review-order#orderingfulfillmentmethod) - Whether this fulfillment method is a delivery or pickup. Either `DELIVERY` or `PICKUP`. --- ### `estimatedFulfillmentDate` `string` - The earliest date this product can be fulfilled using this method, across all distribution centers that support it. Formatted as `YYYY-MM-DD`. This is the same value as the `estimatedFulfillmentDate` of the first entry in [`distributionCenters`](#distributioncenters). --- ### `distributionCenter` [`OrderingDistributionCenter`](/graphql/ordering/search-products#orderingdistributioncenter) - The distribution center that provides the earliest fulfillment date. Pass `distributionCenter { id }` as `distributionCenterId` when calling [`reviewOrder`](/graphql/ordering/review-order) or [`createOrder`](/graphql/ordering/create-order) to place the order at this location. --- ### `distributionCenters` [`OrderingDistributionCenterFulfillmentAvailability[]`](/graphql/ordering/ordering-distribution-center-fulfillment-availability) - All distribution centers that offer this fulfillment method for this product, each with their own estimated fulfillment date. Sorted by estimated fulfillment date ascending (earliest first), so the first entry corresponds to [`distributionCenter`](#distributioncenter). Use this when you need to offer a choice of distribution center rather than defaulting to the earliest one. --- # OrderingProductWarranty Source: https://docs.sibipro.com/graphql/ordering/ordering-product-warranty An extended-warranty product eligible for attachment to a covered equipment line. Returned in [`OrderingOrderProduct.availableWarranties`](/graphql/ordering/ordering-order-product#availablewarranties) and, when one is attached to the line, in [`OrderingOrderProduct.selectedWarranty`](/graphql/ordering/ordering-order-product#selectedwarranty). ```graphql type OrderingProductWarranty { sku: String! name: String! description: String manufacturer: String! priceCents: Int! } ``` ### `sku` `string` - The SKU of the warranty product. Pass this as [`warrantySku`](/graphql/ordering/ordering-order-product-input#warrantysku) on the corresponding product input to attach this warranty to the line. --- ### `name` `string` - The human readable name of the warranty product. --- ### `description` `string | null` - A description of the warranty coverage, when available. --- ### `manufacturer` `string` - The manufacturer of the warranty product. May differ from the equipment manufacturer (extended warranties are sourced from the warranty manufacturer, e.g. AIG). --- ### `priceCents` `number` - The price of the warranty in cents. --- # OrderingReviewOrderWarranties Source: https://docs.sibipro.com/graphql/ordering/ordering-review-order-warranties The extended-warranty sub-order view returned on [`OrderingReviewOrderResponse.warranties`](/graphql/ordering/review-order#orderingrevieworderresponse). It is populated regardless of whether warranty coverage is applied, so callers can preview what coverage would be added — and what it would cost — before committing. Extended warranties are placed as a separate sub-order from the parent equipment order. The pricing fields here describe only that warranty sub-order and never include the parent order's equipment or addon pricing. The per-product options and the resolved selection are available on each [`OrderingOrderProduct`](/graphql/ordering/ordering-order-product) (`availableWarranties` and `selectedWarranty`). ```graphql type OrderingReviewOrderWarranties { paymentMethodId: String! availablePaymentMethods: [OrderingPaymentMethod!]! subtotalCents: Int! taxCents: Int! totalPriceCents: Int! fees: [OrderingFee!]! discounts: [OrderingDiscount!]! } ``` ### `paymentMethodId` `string` - The payment method selected for the warranty sub-order. Defaults to the first id in `availablePaymentMethods` unless overridden via [`warrantyOrderPaymentMethodId`](/graphql/ordering/review-order#orderingrevieworderinput) on the input. --- ### `availablePaymentMethods` [`OrderingPaymentMethod[]`](/graphql/ordering/review-order#orderingpaymentmethod) - The payment methods available for the warranty sub-order. Derived from the warranty manufacturer's payment types, so this may differ from the parent order's `availablePaymentMethods`. Empty when the warranty manufacturer returns no methods for the caller; in that case the warranty sub-order cannot be placed. --- ### `subtotalCents` `number` - The warranty sub-order subtotal in cents. Does not include the parent order's equipment or addon pricing. Zero when no warranty coverage is applied to the order. --- ### `taxCents` `number` - The warranty sub-order tax in cents. Separate from the parent order's tax. Zero when no warranty coverage is applied to the order. --- ### `totalPriceCents` `number` - The warranty sub-order total in cents. Includes the warranty subtotal, tax, and fees minus discounts. Does not include an equipment delivery fee. Zero when no warranty coverage is applied to the order. --- ### `fees` [`OrderingFee[]`](/graphql/ordering/review-order#orderingfee) - Warranty-only fees. Separate from the parent order's fees. Empty when no warranty coverage is applied to the order. --- ### `discounts` [`OrderingDiscount[]`](/graphql/ordering/review-order#orderingdiscount) - Warranty-only discounts. Separate from the parent order's discounts. Empty when no warranty coverage is applied to the order. --- # OrderingUser Source: https://docs.sibipro.com/graphql/ordering/ordering-user An object representing the user who placed an order. ```graphql type OrderingUser { firstName: String! lastName: String! email: String! } ``` ### `firstName` `string` - The first name of the user who placed the order. --- ### `lastName` `string` - The last name of the user who placed the order. --- ### `email` `string` - The email address of the user who placed the order. --- # OrderingWarrantyCoverage Source: https://docs.sibipro.com/graphql/ordering/ordering-warranty-coverage A contiguous time range during which a specific set of coverage types applies to an asset. Adjacent warranty records (e.g., a manufacturer warranty followed by a registered extension) are merged or split so each entry reflects a constant covered set. ```graphql type OrderingWarrantyCoverage { startDate: String! endDate: String! description: String } ``` ### `startDate` `string` - The start of this coverage window, in ISO 8601 format. --- ### `endDate` `string` - The end of this coverage window, in ISO 8601 format. --- ### `description` `string | null` - A human-readable description of what this coverage window covers. Null when no description is available. --- # OrderingQuery.productCategories() Source: https://docs.sibipro.com/graphql/ordering/product-categories > **Deprecated** > > This query is deprecated. Use the REST endpoint > [`GET /product-categories`](/api-reference/product-categories/operations/list-product-categories) instead. It > returns the same categories and is the supported way to list product categories. The query continues to work > while integrations move to REST. Retrieve the list of product categories available for a given manufacturer. Use the returned category names to filter results in [`searchProducts`](/graphql/ordering/search-products). ```graphql type OrderingQuery { productCategories(manufacturer: String!): [OrderingProductCategory!]! @deprecated(reason: "Use the REST endpoint GET https://api.sibipro.com/product-categories instead.") } ``` ## Input ### `manufacturer` `string` - The manufacturer to retrieve categories for (e.g. `'ge'`, `'msi'`). ## Response ### `OrderingProductCategory` [`OrderingProductCategory[]`](#orderingproductcategory) - List of product categories available for the given manufacturer. ## `OrderingProductCategory` ```graphql type OrderingProductCategory { name: String! } ``` ### `name` `string` - The category name. Pass this value in the `categories` parameter of [`searchProducts`](/graphql/ordering/search-products) to filter by this category. --- ## Example ```graphql query { ordering { productCategories(manufacturer: "ge") { name } } } ``` ```json { "data": { "ordering": { "productCategories": [ { "name": "Refrigerators" }, { "name": "Dishwashers" }, { "name": "Ranges" }, { "name": "Washers" } ] } } } ``` --- # OrderingQuery.reviewOrder() Source: https://docs.sibipro.com/graphql/ordering/review-order > **Deprecated** > > This query is deprecated. Use the REST endpoint > [`POST /draft-orders`](/api-reference/draft-orders/operations/create-draft-order) instead. A draft order is > the priced, validated preview of an order: it returns the resolved options, pricing, and availability > without placing anything, and you can then place it with > [`POST /draft-orders/{id}/order`](/api-reference/draft-orders/operations/create-order-from-draft). The query > continues to work while integrations move to REST. _Tip: We provide a [URL configurable Checkout UI](/getting-started/checkout-links) to make using these capabilities a breeze. We recommend using that for most use cases. If you need more control over the experience, we recommend you use the Order review and Order placement capabilities directly._ Takes all the same arguments as [`OrderingMutation.createOrder()`](/graphql/ordering/create-order), so it can be used as a dry-run to validate that the input will create a valid order. The response includes the known valid alternative options that can be passed in for some fields. For example, it includes the available delivery dates, payment methods, and fulfillment types. ## Types ```graphql type OrderingQuery { reviewOrder(input: OrderingReviewOrderInput!): OrderingReviewOrderResponse! @deprecated(reason: "Use the REST endpoint POST https://api.sibipro.com/draft-orders instead.") } ``` - [`input: OrderingReviewOrderInput`](#orderingrevieworderinput) - [`response: OrderingReviewOrderResponse`](#orderingrevieworderresponse) ## `OrderingReviewOrderInput` ```graphql input OrderingReviewOrderInput { manufacturer: String! address: OrderingAddressInput! products: [OrderingOrderProductInput!]! contactInfo: OrderingCustomerContactInfoPartialInput fulfillmentMethodId: String fulfillmentMethodType: OrderingFulfillmentMethodType shipToOfficePropertyId: String requestedDeliveryDate: String poNumber: String specialInstructions: String distributionCenterId: String paymentMethodId: String idempotencyKey: String subscribers: [OrderingOrderSubscriberInput!] warrantyOrderPaymentMethodId: String } ``` --- ### `manufacturer` `string | null` - The manufacturer of the order. --- ### `address` [`OrderingAddressInput`](/graphql/ordering/ordering-address) - The address should correspond to a valid property in the system. If there is no matching property and the address is valid, a new property will be created. If the address is not valid, the mutation will fail with an error. --- ### `products` [`OrderingOrderProductInput[]`](/graphql/ordering/ordering-order-product-input) - An array of order products. At least one product must be specified. --- ### `contactInfo` [`OrderingCustomerContactInfoPartialInput`](/graphql/ordering/ordering-customer-contact-info-partial-input)`| null` - The contact information of the customer placing the order. --- ### `fulfillmentMethodId` `string | null` - The ID of a specific fulfillment method to use. Pass the `id` from one of the `availableFulfillmentMethods` returned by a prior `reviewOrder` call. Cannot be specified together with `fulfillmentMethodType`. When not provided, the API will automatically select a fulfillment method using this logic: 1. If the distributor has a configured default for the resolved type, that default is used. 2. Otherwise, the first available method for the resolved type is used. We recommend calling `reviewOrder` first to discover `availableFulfillmentMethods`, then passing the desired `id` explicitly. --- ### `fulfillmentMethodType` `OrderingFulfillmentMethodType | null` - The type of fulfillment method to use. Possible values are `DELIVERY` and `PICKUP`. Defaults to `DELIVERY` if neither `fulfillmentMethodId` nor `fulfillmentMethodType` is provided. Cannot be specified together with `fulfillmentMethodId`. --- ### `shipToOfficePropertyId` `string | null` - The property id of the office to ship the order to. Only valid when `fulfillmentMethodId` is `'ship-to-office'`. Required when using the ship-to-office fulfillment method. --- ### `requestedDeliveryDate` `string | null` - The date the customer wants the order delivered. If not provided, defaults to the earliest available. If the provided date is not available, the mutation will fail with an error. --- ### `poNumber` `string | null` - The purchase order number associated with the order. Can be any string value. --- ### `specialInstructions` `string | null` - Special instructions for the order, if any. --- ### `distributionCenterId` `string | null` - The ID of the distribution center where the order will be placed. If omitted, the order will be placed in the closest distribution center. --- ### `paymentMethodId` `string | null` - The ID of the payment method associated with the order. Note: Unlike in the `OrderingCreateOrderInput`, this field is not required. --- ### `idempotencyKey` `string | null` - A unique identifier for this request. This field is included for compatibility with `OrderingCreateOrderInput` but is ignored by the `reviewOrder` query. --- ### `subscribers` `OrderingOrderSubscriberInput[]` - An array of subscribers that will receive updates about the order. If the email is not formatted correctly, the query will fail with an error. Other than email validation, the reviewOrder API does not do anything with the subscribers. It is mostly included to make all createOrder inputs valid inputs for reviewOrder. --- ### `warrantyOrderPaymentMethodId` `string | null` - If provided, this payment method is used for the extended-warranty sub-order instead of the parent order's `paymentMethodId`. Must be one of the [`warranties.availablePaymentMethods`](/graphql/ordering/ordering-review-order-warranties#availablepaymentmethods) returned in the response. Ignored when no warranty coverage is applied to the order. --- ## `OrderingOrderSubscriberInput` ```graphql input OrderingOrderSubscriberInput { email: String! } ``` ## `OrderingReviewOrderResponse` ```graphql type OrderingReviewOrderResponse { address: OrderingAddress! products: [OrderingOrderProduct!]! contactInfo: OrderingCustomerContactInfo distributionCenter: OrderingDistributionCenter! taxCents: Int! subtotalCents: Int! totalPriceCents: Int! fees: [OrderingFee!]! discounts: [OrderingDiscount!]! poNumber: String specialInstructions: String fulfillmentMethod: OrderingFulfillmentMethod! requestedDeliveryDate: String! paymentMethodId: String! availablePaymentMethods: [OrderingPaymentMethod!]! availableFulfillmentMethods: [OrderingFulfillmentMethod!]! subscribers: [OrderingOrderSubscriber!]! warranties: OrderingReviewOrderWarranties! } ``` --- ### `address` `OrderingAddress` - The property address associated with the order. If the fulfillmentMethod is `DELIVERY`, this is the address the order will be shipped to. --- ### `products` [`OrderingOrderProduct[]`](/graphql/ordering/ordering-order-product) - An array of order products. --- ### `contactInfo` `OrderingCustomerContactInfo | undefined` - The contact information that was passed in. Has all the same properties as [`OrderingCustomerContactInfoInput`](/graphql/ordering/ordering-customer-contact-info-input). ### `distributionCenter` [`OrderingDistributionCenter`](#orderingdistributioncenter) - The distribution center where the order will be placed. --- ### `taxCents` `number` - The total tax amount for the order, in cents. --- ### `subtotalCents` `number` - The subtotal for the order, in cents. --- ### `totalPriceCents` `number` - The total price for the order, in cents. This is the sum of the subtotal and tax. --- ### `poNumber` `string | undefined` - The purchase order number that was passed in. --- ### `specialInstructions` `string | undefined` - The special instructions that were passed in. --- ### `fulfillmentMethod` [`OrderingFulfillmentMethod`](#orderingfulfillmentmethod) - The fulfillment method that will be used for the order. If the method was auto-selected (no `fulfillmentMethodId` provided), this reflects the resolved default. If an invalid fulfillment method was specified, the query will fail with an error. --- ### `requestedDeliveryDate` `string` - The requested delivery date for the order. The value returned will be a valid delivery date for the product & distribution center. If an invalid delivery date was passed to `revierOrder()`, the query will fail with an error. --- ### `paymentMethodId` `string` - The ID of the payment method that will be used for the order. If no payment method was passed to `reviewOrder()`, the API will pick a value from \`availablePaymentMethods\`\` and return a sensible default. --- ### `availablePaymentMethods` [`OrderingPaymentMethod[]`](#orderingpaymentmethod) - An array of available payment methods for the order. The array will always contain at least one value. If there are no available payment methods, the query will fail with an error. > **Note** > > On the [test environment](/graphql/test-environment) (`https://dev.sibi.pro/graphql`), if the caller has no usable saved Stripe payment method — meaning no bank account and no unexpired card — a Stripe test card is created and saved to them automatically before the order is validated, and it is returned here alongside any other saved methods. Test integrations therefore do not need to provision a card before placing test orders. Callers who already have a usable payment method keep exactly the methods they have. Requests to the production endpoint never get a test card. --- ### `availableFulfillmentMethods` [`OrderingFulfillmentMethod[]`](#orderingfulfillmentmethod) - An array of available fulfillment methods for the order. Use the `id` from one of these entries as `fulfillmentMethodId` when placing or re-reviewing the order. --- ### `fees` `OrderingFee[]` - An array of fees applied to the order. --- ### `discounts` `OrderingDiscount[]` - An array of discounts applied to the order. --- ### `subscribers` `OrderingOrderSubscriber[]` - The list of subscribers that was passed in. --- ### `warranties` [`OrderingReviewOrderWarranties`](/graphql/ordering/ordering-review-order-warranties) - Extended-warranty sub-order details. Populated regardless of whether warranty coverage is applied, so callers can preview what coverage would be added before committing. Per-product warranty options and the resolved selection are available on each [`OrderingOrderProduct`](/graphql/ordering/ordering-order-product) in `products`. ## `OrderingAddress` ```graphql type OrderingAddress { line1: String! line2: String city: String! stateOrProvince: String! postalCode: String! country: String } ``` Both line2 and country are optional. All other fields are required. `reviewOrder` will only return a valid addresses for properties registered with SIBI. If an invalid address is passed to `reviewOrder()`, the query will fail with an error. --- ## `OrderingDistributionCenter` ```graphql type OrderingDistributionCenter { id: ID! name: String! latitude: Float longitude: Float address: OrderingAddress! imageUrl: String storeNumber: String! phone: String } ``` ### `id` `string` - The distribution center's unique identifier. Use this when placing orders at a specific DC. --- ### `name` `string` - The name of the distribution center. --- ### `latitude` `number | undefined` - The latitude of the distribution center's location. --- ### `longitude` `number | undefined` - The longitude of the distribution center's location. --- ### `address` [`OrderingAddress`](#orderingaddress) - The address of the distribution center. --- ### `imageUrl` `string | undefined` - The URL of the distribution center's logo. --- ### `storeNumber` `string` - The store number of the distribution center. May not actually be numeric. --- ### `phone` `string | undefined` - The phone number of the distribution center, as the distributor publishes it. Absent when the distributor has not provided one. --- ## `OrderingFee` ```graphql type OrderingFee { name: String! amountCents: Int! } ``` ### `name` `string` - The name of the fee. --- ### `amountCents` `number` - The fee amount in cents. --- ## `OrderingDiscount` ```graphql type OrderingDiscount { name: String! amountCents: Int! } ``` ### `name` `string` - The name of the discount. --- ### `amountCents` `number` - The discount amount in cents. --- ## `OrderingFulfillmentMethod` ```graphql type OrderingFulfillmentMethod { id: String! title: String! description: String type: OrderingFulfillmentMethodType! dates: [String!]! } enum OrderingFulfillmentMethodType { DELIVERY PICKUP } ``` ### `id` `string` - The unique identifier for the fulfillment method. Use this when placing orders with a specific fulfillment method. --- ### `title` `string` - The human-readable title of the fulfillment method. --- ### `description` `string | undefined` - An optional description providing additional details about the fulfillment method. --- ### `type` `OrderingFulfillmentMethodType` - The type of fulfillment method. Either `DELIVERY` or `PICKUP`. --- ### `dates` `string[]` - An array of available dates for this fulfillment method. --- ## `OrderingPaymentMethod` ```graphql union OrderingPaymentMethod = OrderingPaymentMethodManufacturerCredit | OrderingPaymentMethodStripe type OrderingPaymentMethodManufacturerCredit { id: String! description: String! } type OrderingPaymentMethodStripe { id: String! description: String! last4: String! } ``` These are the two possible payment methods that can be returned by `reviewOrder()`. The `id` and `description` fields are always returned. The `last4` field is only returned for `OrderingPaymentMethodStripe`. --- ### `id` `string` - The ID of the payment method. --- ### `description` `string` - A human-readable description of the payment method. --- ### `last4` `string` - The last 4 digits of the credit card number. Only returned for `OrderingPaymentMethodStripe`. --- # OrderingQuery.searchProducts() Source: https://docs.sibipro.com/graphql/ordering/search-products > **Deprecated** > > This query is deprecated. Use the REST endpoint > [`GET /products`](/api-reference/products/operations/get) instead. It returns the same products, with > availability and pricing, and is the supported way to search products. The query continues to work while > integrations move to REST. ```graphql type OrderingQuery { searchProducts( address: OrderingAddressInput searchTerm: String manufacturer: String categories: [String!] page: Int hitsPerPage: Int onlyInStock: Boolean dimensions: OrderingProductDimensionFiltersInput ): [OrderingProduct!]! @deprecated(reason: "Use the REST endpoint GET https://api.sibipro.com/products instead.") } ``` ## Input ### `address` [`OrderingAddressInput`](/graphql/ordering/ordering-address) - The address associated with the order. The address must be a valid address. If the address is not valid, the query will fail with an error. If the address is valid but we don't already have a property for it, then a property will be created and assigned to the organization the calling credentials belong to. ### `searchTerm` `string | undefined` - The search term to use when searching for products. If not provided, all products will be returned. ### `manufacturer` `string | undefined` - The manufacturer of the products to search for. If not provided, products from GE will be returned. ### `categories` `string[] | undefined` - Return products that are in one of the categories specified. Will search across all categories if omitted. Use [`productCategories`](/graphql/ordering/product-categories) to retrieve the list of valid category names for a manufacturer. ### `page` `number | undefined` - The zero-based index of the page of results to return. The first page is `0`, so `page: 1` returns the **second** page, not the first. If not provided, defaults to `0`. ### `hitsPerPage` `number | undefined` - The number of results to return per page. If not provided, defaults to 30. ### `onlyInStock` `boolean | undefined` - If `true`, only products that have an availability status of `IN_STOCK` will be returned. If set to `false` or not provided, all products will be returned. Enabling this filter can increase the latency of the response by 2-3x. ### `dimensions` [`OrderingProductDimensionFiltersInput | undefined`](#orderingproductdimensionfiltersinput) - Constrain results to products that physically fit a known space — for example, the appliance enclosure left behind by a warranty replacement. A product must satisfy every supplied bound to match; products that have no measurement for a constrained dimension are excluded. If not provided, no dimension filtering is applied. ```graphql query { ordering { searchProducts( manufacturer: "ge" categories: ["Refrigerators"] dimensions: { maxWidth: 36, maxHeight: 70, maxDepth: 36 } ) { sku title dimensions { width height depth } } } } ``` ## Response ### `OrderingProduct` [`OrderingProduct[]`](#orderingproduct) - List of products matching the search criteria. ## `OrderingProduct` ```graphql type OrderingProduct { sku: String! manufacturer: String! title: String! subtitle: String description: String category: String! subcategories: [String!]! color: String @deprecated(reason: "Use attributes instead.") attributes: [OrderingProductAttribute!]! viewUrl: String! availability: OrderingAvailability! imageUrl: String! imageUrls: [String!]! priceCents: Int! msrpPriceCents: Int addons: [OrderingProductAddon!]! dimensions: OrderingProductDimensions! baseUnitOfMeasure: String! unitsOfMeasure: [OrderingProductUnitOfMeasure!]! recommendedParts: [OrderingProductPart!]! availableFulfillmentMethods: [OrderingProductFulfillmentMethod!]! warranties: [OrderingProductWarranty!]! options: [OrderingProductOption!]! id: ID! @deprecated(reason: "Use sku instead.") } ``` ### `sku` `string` - The SKU of the product. Is defined by the manufacturer or distributor. --- ### `manufacturer` `string` - The manufacturer of the product. This value is valid for use in the `manufacturer` field of all input types that accept a manufacturer. --- ### `title` `string` - The human readable name of the product. --- ### `subtitle` `string | null` - A short description of the product. --- ### `description` `string | null` - A brief description of the product. Will be `null` when not available. --- ### `category` `string` - The broad category this product falls into. --- ### `subcategories` `string[]` - Array of strings of all the specific subcategories this product falls into. May be empty and may also be 1:1 with `category` --- ### `color` (deprecated) `string | null` - **Deprecated.** Read the `color` entry of [`attributes`](#attributes) instead. The color of the product. Is not available for all products. --- ### `attributes` [`OrderingProductAttribute[]`](/graphql/ordering/ordering-product-attribute) - The catalog attributes of this product that are relevant to ordering it, as `{ name, value }` pairs — e.g. `sheen` or `color`. Which attributes a product carries varies by product; empty when it has none. --- ### `viewUrl` `string` - A URL to view the product in the Sibi Web UI. --- ### `availability` [`OrderingAvailability`](#orderingavailability) - The availability of the product. Returns a status of 'UNKNOWN' and a quantity of 0 if the address is missing. --- ### `imageUrl` `string` - The URL of the product's image. --- ### `imageUrls` `string[]` - The URLs of all of the product's images, with the primary image (the same image returned by `imageUrl`) always first. --- ### `priceCents` `number` - The price of the product in cents, per base unit (denominated in `baseUnitOfMeasure`). --- ### `msrpPriceCents` `number | null` - The Manufacturer's Suggested Retail Price of the product in cents. Is not available for all products. Will be `null` when not available. --- ### `addons` [`OrderingProductAddon`](/graphql/ordering/ordering-order-product#orderingproductaddon)\[] - An array of addons (services and/or accessories) that can be ordered with the product. --- ### `dimensions` [`OrderingProductDimensions`](#orderingproductdimensions) - The physical dimensions of the product. --- ### `baseUnitOfMeasure` `string` - The unit this product's `priceCents` is denominated in (e.g. "Each", "Sq Ft"). When `unitsOfMeasure` is non-empty, the product cannot be purchased in fractional amounts of this base unit directly — pass one of `unitsOfMeasure`'s `unitOfMeasure` values as `unitOfMeasure` when calling `reviewOrder` or `createOrder`. When `unitsOfMeasure` is empty, pass this value instead (or omit `unitOfMeasure` to default to it). --- ### `unitsOfMeasure` [`OrderingProductUnitOfMeasure[]`](#orderingproductunitofmeasure) - Alternate purchasable units for this product — e.g. a flooring product priced by the `Sq Ft` that can only be ordered by the `Box` or `Pallet`, each covering a fixed quantity of `baseUnitOfMeasure` (see `quantityPerBaseUnit`). Empty when the product has no alternate units and can be ordered directly in `baseUnitOfMeasure`. --- ### `recommendedParts` [`OrderingProductPart[]`](#orderingproductpart) - An array of products that can be purchased with the parent. Will include things like power cables for electric ranges or ice makers for refrigerators. Some of these parts are included with addons. For example, an electric range's "Install" addon will generally include the power cable part. --- ### `availableFulfillmentMethods` [`OrderingProductFulfillmentMethod[]`](/graphql/ordering/ordering-product-fulfillment-method) - The fulfillment methods available for this product, each showing the earliest date it can be fulfilled and the distribution center that provides that date. Each method also carries the full set of distribution centers that can fulfill this product by that method, each with its own estimated fulfillment date, in [`distributionCenters`](/graphql/ordering/ordering-product-fulfillment-method#distributioncenters) — sorted earliest first, so the top-level `estimatedFulfillmentDate` and `distributionCenter` correspond to its first entry. Use that list when you need to offer a choice of distribution center rather than defaulting to the earliest. Returns an empty array when no address is provided or when fulfillment information is unavailable. --- ### `warranties` [`OrderingProductWarranty[]`](/graphql/ordering/ordering-product-warranty) - The extended-warranty products that can be purchased alongside this product. Returns an empty array when no address is provided or when no warranty coverage is available for the product. --- ### `options` [`OrderingProductOption[]`](#orderingproductoption) - The selectable option values for this product — e.g. the standard color palette of a PPG tintable paint, one entry per color. Entries sharing a `key` are alternative values for the same option. Empty for products with no selectable options. Some products have an option that must be selected at order time (e.g. PPG tintable paints) — one of its `{ key, value }` pairs must be included in `products[].options`, and omitting it is rejected with an `INVALID_PRODUCT_OPTIONS` error — when calling [`reviewOrder`](/graphql/ordering/review-order) or [`createOrder`](/graphql/ordering/create-order). This list holds each option's standard values; other valid values may exist beyond it (e.g. the full PPG color catalog), and any valid value identifier is accepted at order time. ```graphql query { ordering { searchProducts(manufacturer: "ppg", searchTerm: "interior paint") { sku title options { key value name hex } } } } ``` --- ### `id` (deprecated) `string` - **Deprecated.** Use [`sku`](#sku) to identify products instead. --- ## `OrderingAvailability` ```graphql type OrderingAvailability { status: OrderingAvailabilityStatus! quantity: Int! distributionCenters: [OrderingDistributionCenterAvailability!]! } ``` ### `status` `OrderingAvailabilityStatus` - The availability status of the product. One of `IN_STOCK`, `OUT_OF_STOCK`, `UNAVAILABLE`, or `UNKNOWN`. The value of `status` always reflects local availability for the required address provided. ### `quantity` `number` - The quantity of the product that is available at the closest distribution center to the property that has the product available. ### `distributionCenters` [`OrderingDistributionCenterAvailability[]`](#orderingdistributioncenteravailability) - Per-distribution-center availability breakdown. Each entry represents a distribution center that carries this product. Only populated when an address is provided. Returns an empty array when distribution center information is unavailable. --- ## `OrderingDistributionCenterAvailability` ```graphql type OrderingDistributionCenterAvailability { status: OrderingAvailabilityStatus! quantity: Int! distributionCenter: OrderingDistributionCenter! distributionCenterId: ID! @deprecated(reason: "Use distributionCenter { id } instead.") distributionCenterLatitude: Float @deprecated(reason: "Use distributionCenter { latitude } instead.") distributionCenterLongitude: Float @deprecated(reason: "Use distributionCenter { longitude } instead.") distributionCenterAddress: OrderingAddress! @deprecated(reason: "Use distributionCenter { address } instead.") } ``` ### `status` `OrderingAvailabilityStatus` - The availability status of the product at this distribution center. One of `IN_STOCK`, `OUT_OF_STOCK`, `UNAVAILABLE`, or `UNKNOWN`. ### `quantity` `number` - The quantity of the product available at this distribution center. ### `distributionCenter` [`OrderingDistributionCenter`](#orderingdistributioncenter) - The distribution center where this product is available. Use `distributionCenter { id }` when calling `reviewOrder` or `createOrder` to specify a distribution center. ### `distributionCenterId` (deprecated) `string` - **Deprecated.** Use `distributionCenter { id }` instead. ### `distributionCenterLatitude` (deprecated) `number | null` - **Deprecated.** Use `distributionCenter { latitude }` instead. ### `distributionCenterLongitude` (deprecated) `number | null` - **Deprecated.** Use `distributionCenter { longitude }` instead. ### `distributionCenterAddress` (deprecated) [`OrderingAddress`](/graphql/ordering/ordering-address) - **Deprecated.** Use `distributionCenter { address }` instead. --- ## `OrderingDistributionCenter` ```graphql type OrderingDistributionCenter { id: ID! name: String! latitude: Float longitude: Float address: OrderingAddress! imageUrl: String storeNumber: String! phone: String } ``` ### `id` `string` - The distribution center's unique identifier. Use this when placing orders at a specific DC. ### `name` `string` - The name of the distribution center. ### `latitude` `number | null` - The latitude of the distribution center's location. ### `longitude` `number | null` - The longitude of the distribution center's location. ### `address` [`OrderingAddress`](/graphql/ordering/ordering-address) - The address of the distribution center. ### `imageUrl` `string | null` - The URL of the distribution center's logo. ### `storeNumber` `string` - The store number of the distribution center. May not actually be numeric. --- ### `phone` `string | undefined` - The phone number of the distribution center, as the distributor publishes it. Absent when the distributor has not provided one. --- ## `OrderingProductDimensions` ```graphql type OrderingProductDimensions { length: Float lengthUnit: String width: Float widthUnit: String height: Float heightUnit: String depth: Float depthUnit: String } ``` A product reports its front-to-back extent under either `depth` or `length` depending on its manufacturer's convention — most appliances report `depth`, most HVAC equipment reports `length` — not both. ### `length` `number | null` - The numerical length value. Will be null if not available. ### `lengthUnit` `string | null` - The unit of measurement for length (e.g., "inch"). Will be null if not available. ### `width` `number | null` - The numerical width value. Will be null if not available. ### `widthUnit` `string | null` - The unit of measurement for width (e.g., "inch"). Will be null if not available. ### `height` `number | null` - The numerical height value. Will be null if not available. ### `heightUnit` `string | null` - The unit of measurement for height (e.g., "inch"). Will be null if not available. ### `depth` `number | null` - The numerical depth value. Will be null if not available. ### `depthUnit` `string | null` - The unit of measurement for depth (e.g., "inch"). Will be null if not available. --- ## `OrderingProductUnitOfMeasure` ```graphql type OrderingProductUnitOfMeasure { unitOfMeasure: String! quantityPerBaseUnit: Float! } ``` An alternate purchasable unit for a product, and how it converts to the product's `baseUnitOfMeasure`. See [`OrderingProduct.unitsOfMeasure`](#unitsofmeasure). ### `unitOfMeasure` `string` - The unit to pass as `unitOfMeasure` when calling `reviewOrder` or `createOrder` to purchase this product in this unit (e.g. "Box", "Pallet"). ### `quantityPerBaseUnit` `number` - The number of `baseUnitOfMeasure` contained in each of this unit (e.g. 23.77 sq ft per box). Multiply by the requested quantity of this unit to get the total in the base unit. --- ## `OrderingProductDimensionFiltersInput` ```graphql input OrderingProductDimensionFiltersInput { minWidth: Float maxWidth: Float minHeight: Float maxHeight: Float minDepth: Float maxDepth: Float minLength: Float maxLength: Float } ``` Inclusive min/max bounds per physical dimension. Field names mirror the [`OrderingProductDimensions`](#orderingproductdimensions) returned on each product, and values are compared against that product's measurement with no unit conversion — interpret them in the unit reported by the matching `*Unit` field (inches for most catalog products). For any dimension: - `min*` only — matches that dimension or larger - `max*` only — matches that dimension or smaller (e.g. fits within an opening) - `min*` and `max*` equal — matches an exact dimension - both, different — matches a bounded range Bounds across dimensions are AND-ed, and each bound matches only its own field — a `length` bound never matches a product's `depth`, and vice versa. Products with no measurement for a constrained dimension are excluded. Products report their front-to-back extent as either `depth` or `length` (never both) depending on the manufacturer's convention: most appliances report `depth`, most HVAC equipment reports `length`. Choose the field that matches the products you're searching; check `dimensions` on the results if unsure. Supplying bounds on both is valid but matches only products that report both measurements — currently none. A dimension whose `min*` exceeds its `max*` can never match and is rejected with an `INVALID_DIMENSION_RANGE` error rather than returning an empty result. ### `minWidth` `number | undefined` - Match products whose width is at least this value (inclusive). ### `maxWidth` `number | undefined` - Match products whose width is at most this value (inclusive). ### `minHeight` `number | undefined` - Match products whose height is at least this value (inclusive). ### `maxHeight` `number | undefined` - Match products whose height is at most this value (inclusive). ### `minDepth` `number | undefined` - Match products whose depth is at least this value (inclusive). ### `maxDepth` `number | undefined` - Match products whose depth is at most this value (inclusive). ### `minLength` `number | undefined` - Match products whose length is at least this value (inclusive). ### `maxLength` `number | undefined` - Match products whose length is at most this value (inclusive). ## `OrderingProductOption` ```graphql type OrderingProductOption { key: String! value: String! name: String! title: String! @deprecated(reason: "Use name instead.") hex: String } ``` A value a product's selectable option can be set to — e.g. one paint color. To select it, pass its `{ key, value }` in `products[].options` when calling [`reviewOrder`](/graphql/ordering/review-order) or [`createOrder`](/graphql/ordering/create-order). Entries sharing a `key` are alternative values for the same option. The same type is echoed on reviewOrder responses as the selection on each product line — see [`OrderingOrderProduct.options`](/graphql/ordering/ordering-order-product#options). ### `key` `string` - The option identifier (e.g. `"ppg-paint-color"`). Pass this as `options[].key` when calling `reviewOrder` or `createOrder`. ### `value` `string` - The value identifier (e.g. the PPG color code `"PPG1105-3"`). Pass this as `options[].value` when calling `reviewOrder` or `createOrder`. ### `name` `string` - The human readable name of the value (e.g. the paint color name "Delicate White"). ### `title` (deprecated) `string` - **Deprecated.** Use `name` instead. ### `hex` `string | null` - The CSS hex color (`#RRGGBB`) of this value, for values that represent a color (e.g. a paint color). Will be `null` when the value has no color representation. --- ## `OrderingProductPart` ```graphql type OrderingProductPart { sku: String! title: String! category: String! priceCents: Int! } ``` ### `sku` `string` - The SKU of the part. It is defined by the manufacturer or distributor. ### `title` `string` - The human readable name of the part. ### `category` `string` - The broad category this part falls into. ### `priceCents` `number` - The price of the part in cents. --- # Test GraphQL Environment Source: https://docs.sibipro.com/graphql/test-environment ## Test Environment For testing and development purposes, we provide a dedicated GraphQL test environment. This environment allows you to test API integrations without triggering real shipments or financial transactions. The test environment is available at: [https://dev.sibi.pro/graphql](https://dev.sibi.pro/graphql) ## Key Features - All requests made to this endpoint are treated as test requests - No real financial transactions will be processed - Distributors will not be notified about orders - Test data is regularly purged - Test orders do not require a pre-provisioned payment method: if the caller has no usable saved Stripe payment method — no bank account and no unexpired card — a Stripe test card is created and saved to them automatically the first time an order is reviewed or created. It is returned in `availablePaymentMethods` from then on. Callers who already have a usable payment method keep exactly the methods they have, and production requests never get a test card. - All other API functionality works as expected ## Authentication Authentication works the same way as the production API. Include your API key in the Authorization header: ```shell Curl curl \ --request POST \ --header 'Authorization: Bearer ' \ --data '{"query": ""}' \ https://dev.sibi.pro/graphql ``` ```javascript Fetch const response = await fetch('https://dev.sibi.pro/graphql', { method: 'POST', headers: { Authorization: `Bearer ${yourApiKey}` }, body: JSON.stringify({ query: '' }), }); const data = await response.json(); ``` ## Example Test Requests Below are examples of common test operations you can perform on the test environment. ### Search Products ```graphql query SearchProducts($search: String!) { searchProducts(search: $search) { edges { id name price } } } ``` ### Place Test Order ```graphql mutation PlaceOrder($input: OrderInput!) { placeOrder(input: $input) { id status total } } ``` ## Important Notes - The test environment mirrors the production environment's schema and validation rules - While financial transactions aren't processed, all other business logic remains intact - Test data may be purged periodically For full GraphQL API documentation, see [Making a GraphQL Request](/graphql/making-a-graphql-request). --- # Research Agent Source: https://docs.sibipro.com/research-agent Private access # Product research, ready for your workflow Research Agent identifies the product in a query and returns compatible alternatives with the technical detail needed to evaluate a substitution. Submit a model number, part number, or natural-language description and receive structured results your application can use. **Identify** Resolve a short query into a manufacturer, model, description, image, and specifications. **Compare** Review ranked alternatives with specifications and plain-language match reasoning. **Act** Detect SIBI availability, pricing, and checkout links when a candidate is orderable. ## Common workflows - **Out-of-stock replacements** — find viable alternatives when the original specification is unavailable. - **Discontinued models** — keep a project moving with comparable current products. - **Value research** — compare lower-cost options without losing sight of fit and features. - **Field replacements** — give teams structured product options for time-sensitive installations. ## How a request works 1. **Create a task** Send the product identifier or description to your assigned Research Agent. 2. **Poll the task** Use the returned `statusUrl` until the task is `complete` or `failed`. 3. **Use the result** Read the identified product, candidate replacements, pricing, availability, and match reasoning. 4. **Continue when needed** If Research Agent asks a clarifying question, reply on the same task and resume polling. **[Start with authentication](/research-agent/authentication)** Get your access token and assigned agent ID. **[Make your first request](/research-agent/quickstart)** Create and poll a task with curl or JavaScript. --- # Research Agent API Source: https://docs.sibipro.com/research-agent/api-reference Create asynchronous product-research tasks, poll for structured replacement recommendations, continue a task after a clarification, and send feedback. Version 1.0.0 Base URL: `https://agents.sibi.ai` ## Tasks Create, poll, and continue Research Agent tasks. - [`POST /api/agents/{agentId}/tasks/create`](/research-agent/api-reference/tasks/create-research-task) — Create a research task. - [`GET /api/agents/{agentId}/tasks/{taskId}`](/research-agent/api-reference/tasks/get-research-task) — Get a task. - [`POST /api/agents/{agentId}/tasks/{taskId}/messages`](/research-agent/api-reference/tasks/continue-research-task) — Continue a task. ## Feedback Attach feedback to a completed task result. - [`POST /api/agents/{agentId}/tasks/{taskId}/feedback`](/research-agent/api-reference/feedback/send-research-feedback) — Send task feedback. --- # Send task feedback Source: https://docs.sibipro.com/research-agent/api-reference/feedback/send-research-feedback Attaches feedback to the latest assistant response on a task. `POST /api/agents/{agentId}/tasks/{taskId}/feedback` **Request body** (`application/json`, required) - `sentiment` (integer, required) - `comment` (string) Request body example: ```json { "sentiment": 1, "comment": "The top candidate matched the required dimensions." } ``` **Responses** - `200` — Feedback recorded. - `400` — The request body is invalid. - `401` — The bearer token is missing or invalid. - `403` — The authenticated user cannot access the requested agent. - `404` — The task was not found for this user and agent. - `409` — The task has not produced a response. Response example, 200: ```json { "success": true } ``` Response example, 401: ```json { "error": "Unauthorized" } ``` Response example, 403: ```json { "error": "Forbidden" } ``` Response example, 404: ```json { "error": "Task not found" } ``` Response example, 409: ```json { "error": "Task is still pending" } ``` --- # Continue a task Source: https://docs.sibipro.com/research-agent/api-reference/tasks/continue-research-task Adds a message to an existing task and resumes asynchronous processing. `POST /api/agents/{agentId}/tasks/{taskId}/messages` **Request body** (`application/json`, required) - `message` (string, required) — A product model, part number, description, or follow-up answer. - `attachments` (Attachment[]) Request body example: ```json { "message": "Manufacturer A" } ``` **Responses** - `202` — Follow-up accepted. - `400` — The request body is invalid. - `401` — The bearer token is missing or invalid. - `403` — The authenticated user cannot access the requested agent. - `404` — The task was not found for this user and agent. Response example, 202: ```json { "status": "pending", "taskId": "string", "statusUrl": "http://example.com" } ``` Response example, 401: ```json { "error": "Unauthorized" } ``` Response example, 403: ```json { "error": "Forbidden" } ``` Response example, 404: ```json { "error": "Task not found" } ``` --- # Create a research task Source: https://docs.sibipro.com/research-agent/api-reference/tasks/create-research-task Starts an asynchronous Research Agent task and returns a status URL to poll. `POST /api/agents/{agentId}/tasks/create` **Request body** (`application/json`, required) - `message` (string, required) — A product model, part number, description, or follow-up answer. - `attachments` (Attachment[]) Request body example, Research a model number: ```json { "message": "GE GTS18GTHWW" } ``` Request body example, Research from a description: ```json { "message": "18 cubic foot white refrigerator" } ``` **Responses** - `202` — Task accepted. - `400` — The request body is invalid. - `401` — The bearer token is missing or invalid. - `403` — The authenticated user cannot access the requested agent. Response example, 202: ```json { "status": "pending", "taskId": "string", "statusUrl": "http://example.com" } ``` Response example, 401: ```json { "error": "Unauthorized" } ``` Response example, 403: ```json { "error": "Forbidden" } ``` --- # Get a task Source: https://docs.sibipro.com/research-agent/api-reference/tasks/get-research-task Polls a Research Agent task and returns its current state or result. `GET /api/agents/{agentId}/tasks/{taskId}` **Responses** - `200` — Current task state. - `401` — The bearer token is missing or invalid. - `403` — The authenticated user cannot access the requested agent. - `404` — The task was not found for this user and agent. Response example, 200: ```json { "status": "pending", "taskId": "string" } ``` Response example, 401: ```json { "error": "Unauthorized" } ``` Response example, 403: ```json { "error": "Forbidden" } ``` Response example, 404: ```json { "error": "Task not found" } ``` --- # Making a REST Request Source: https://docs.sibipro.com/rest/making-a-rest-request The SIBI public REST API exposes resources for Offers, Products, Assets, Orders, and Draft Orders. You can use any HTTP client to make requests. The examples below use [curl](https://curl.se/) & [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch). ## Endpoint The REST API is available at: `https://api.sibipro.com` Resources are exposed under the following base paths: - `/offers` — manage offers (see the [Offers](/api-reference/offers/guide) reference) - `/products` — look up product details (see the [Products](/api-reference/products/guide) reference) - `/orders` — create, read, and cancel orders (see the [Orders](/api-reference/orders) reference) - `/draft-orders` — price an order without placing it, then place it (see the [Draft Orders](/api-reference/draft-orders/guide) reference) - `/assets` — look up installed assets and their warranty coverage (see the [Assets](/api-reference/assets/guide) reference) ## Authentication The SIBI REST API authenticates with a **REST API token**. Create one in the [SIBI developer dashboard](https://developer.sibipro.com), choosing the scopes your integration needs, and send it in the `Authorization` header of every request, prefixed by `Bearer`. REST API tokens are scoped: an endpoint refuses a token that does not contain a scope it requires. See [REST API Tokens](/getting-started/rest-tokens) for the scope catalog. REST endpoints refuse GraphQL tokens with `403 REST_TOKEN_REQUIRED`. Use a REST API token. ```shell Curl curl \ --request GET \ --header 'Authorization: Bearer ' \ https://api.sibipro.com/offers # => {"data": [...]} ``` ```javascript Fetch const response = await fetch('https://api.sibipro.com/offers', { method: 'GET', headers: { Authorization: `Bearer ${yourApiKey}` }, }); const offers = await response.json(); console.log(JSON.stringify(offers, null, 2)); ``` ## Making a Request REST endpoints follow standard HTTP conventions. Use `GET` to read a resource and `POST` to create or trigger an action. Request bodies are sent as JSON with `Content-Type: application/json`. ### Reading a resource ```shell Curl curl \ --request GET \ --header 'Authorization: Bearer ' \ https://api.sibipro.com/products/ ``` ```javascript Fetch const response = await fetch(`https://api.sibipro.com/products/${sku}`, { method: 'GET', headers: { Authorization: `Bearer ${yourApiKey}` }, }); const product = await response.json(); ``` ### Sending data ```shell Curl curl \ --request POST \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{"reason": "Customer requested a cancellation"}' \ https://api.sibipro.com/orders//cancel ``` ```javascript Fetch const response = await fetch(`https://api.sibipro.com/orders/${orderId}/cancel`, { method: 'POST', headers: { Authorization: `Bearer ${yourApiKey}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ reason: 'Customer requested a cancellation' }), }); const result = await response.json(); ``` ## Responses Successful responses return JSON. For example, a cancellation request returns: ```json Response { "cancellationStatus": "pending", "cancellationReason": "Customer requested a cancellation", "requestedAt": "2024-01-20T12:00:00Z" } ``` ## Errors Errors are returned with a standard HTTP status code (`4xx` for client errors, `5xx` for server errors) and a JSON body describing the failure: ```json Error { "code": "VALIDATION_ERROR", "message": "Invalid input parameters", "details": [{ "field": "reason", "error": "Required" }] } ``` Authentication and scope failures use these codes: | Status | Code | Meaning | | --- | --- | --- | | 401 | `UNAUTHORIZED` | No `Authorization` header, or a token we cannot resolve | | 403 | `INSUFFICIENT_SCOPE` | Valid REST API token, but it lacks a scope this endpoint accepts | | 403 | `REST_TOKEN_REQUIRED` | A GraphQL token was sent to an endpoint that requires a REST API token | | 403 | `TOKEN_ENVIRONMENT_MISMATCH` | The token was minted for the other environment | For full schema details and the complete list of endpoints, see the per-resource references in the navigation. --- # Test REST Environment Source: https://docs.sibipro.com/rest/test-environment ## Test Environment For testing and development purposes, we provide a dedicated REST test environment. This environment allows you to test API integrations without triggering real shipments or financial transactions. The test environment is hosted at `https://dev.sibi.pro`, with each REST resource available under its own base path: - Offers: `https://dev.sibi.pro/offers*` - Products: `https://dev.sibi.pro/products*` - Orders: `https://dev.sibi.pro/orders*` - Draft Orders: `https://dev.sibi.pro/draft-orders*` - Assets: `https://dev.sibi.pro/assets*` ## Key Features - All requests made to these endpoints are treated as test requests - No real financial transactions will be processed - Distributors will not be notified about orders - Test data is regularly purged. Assets created or imported in the test environment are deleted 7 days after they are created. - Assets created or imported in the test environment send `asset.created` and `asset.updated` events to your [test webhooks](/events/receive-events) only - All other API functionality works as expected ## Authentication Authentication works the same way as the production API, but the tokens are not shared: mint a **test** REST API token for this environment. A production token sent here is refused with `403 TOKEN_ENVIRONMENT_MISMATCH`, and vice versa. See [REST API Tokens](/getting-started/rest-tokens). Include the token in the `Authorization` header: ```shell Curl curl \ --request GET \ --header 'Authorization: Bearer ' \ https://dev.sibi.pro/offers ``` ```javascript Fetch const response = await fetch('https://dev.sibi.pro/offers', { method: 'GET', headers: { Authorization: `Bearer ${yourApiKey}` }, }); const data = await response.json(); ``` ## Example Test Requests Below are examples of common test operations you can perform on the test environment. ### List Offers ```shell Curl curl \ --request GET \ --header 'Authorization: Bearer ' \ https://dev.sibi.pro/offers ``` ### Get a Product by SKU ```shell Curl curl \ --request GET \ --header 'Authorization: Bearer ' \ https://dev.sibi.pro/products/ ``` ### Cancel an Order ```shell Curl curl \ --request POST \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{"reason": "Customer requested a cancellation"}' \ https://dev.sibi.pro/orders//cancel ``` ## Important Notes - The test environment mirrors the production environment's schema and validation rules - While financial transactions aren't processed, all other business logic remains intact - Test data may be purged periodically For full REST API documentation, see [Making a REST Request](/rest/making-a-rest-request).