Skip to main content

Catalog

List catalog bookings

GET
/projects/{projectId}/catalog/bookings
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

Query Parameters

item_id?string

Filter by catalog item

user_id?string

Filter by end-user id

status?string

Filter by status (hold|confirmed|cancelled|expired)

limit?integer
Default100
Formatint64
Range1 <= value <= 500
offset?integer
Default0
Formatint64
Range0 <= value

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/projects/string/catalog/bookings"
{
  "$schema": "/api/v1/schemas/CatalogListBookingsOutputBody.json",
  "bookings": [
    {
      "$schema": "/api/v1/schemas/CatalogBooking.json",
      "agent_id": "string",
      "booking_id": "string",
      "conversation_id": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "external_ref": "string",
      "hold_expires_at": "2019-08-24T14:15:22Z",
      "item_id": "string",
      "kind": "string",
      "metadata": {
        "property1": null,
        "property2": null
      },
      "project_id": "string",
      "slot_id": "string",
      "status": "string",
      "tenant_id": "string",
      "updated_at": "2019-08-24T14:15:22Z",
      "user_id": "string"
    }
  ]
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Create a booking hold against a catalog item (and slot, for a viewing)

POST
/projects/{projectId}/catalog/bookings
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

Header Parameters

X-Agent-Id?string

ID of the agent brokering this hold, if agent-initiated.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/projects/string/catalog/bookings" \  -H "Content-Type: application/json" \  -d '{    "item_id": "string",    "user_id": "string"  }'
{
  "$schema": "/api/v1/schemas/CatalogBooking.json",
  "agent_id": "string",
  "booking_id": "string",
  "conversation_id": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "external_ref": "string",
  "hold_expires_at": "2019-08-24T14:15:22Z",
  "item_id": "string",
  "kind": "string",
  "metadata": {
    "property1": null,
    "property2": null
  },
  "project_id": "string",
  "slot_id": "string",
  "status": "string",
  "tenant_id": "string",
  "updated_at": "2019-08-24T14:15:22Z",
  "user_id": "string"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Get a catalog booking

GET
/projects/{projectId}/catalog/bookings/{bookingId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

bookingId*string

Catalog booking UUID

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/projects/string/catalog/bookings/string"
{
  "$schema": "/api/v1/schemas/CatalogBooking.json",
  "agent_id": "string",
  "booking_id": "string",
  "conversation_id": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "external_ref": "string",
  "hold_expires_at": "2019-08-24T14:15:22Z",
  "item_id": "string",
  "kind": "string",
  "metadata": {
    "property1": null,
    "property2": null
  },
  "project_id": "string",
  "slot_id": "string",
  "status": "string",
  "tenant_id": "string",
  "updated_at": "2019-08-24T14:15:22Z",
  "user_id": "string"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Cancel a booking

POST
/projects/{projectId}/catalog/bookings/{bookingId}/cancel
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

bookingId*string

Catalog booking UUID

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/projects/string/catalog/bookings/string/cancel"
{
  "$schema": "/api/v1/schemas/CatalogBooking.json",
  "agent_id": "string",
  "booking_id": "string",
  "conversation_id": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "external_ref": "string",
  "hold_expires_at": "2019-08-24T14:15:22Z",
  "item_id": "string",
  "kind": "string",
  "metadata": {
    "property1": null,
    "property2": null
  },
  "project_id": "string",
  "slot_id": "string",
  "status": "string",
  "tenant_id": "string",
  "updated_at": "2019-08-24T14:15:22Z",
  "user_id": "string"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Confirm a booking hold

POST
/projects/{projectId}/catalog/bookings/{bookingId}/confirm
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

bookingId*string

Catalog booking UUID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

external_ref?string

Tenant-side booking id to stamp on confirmation.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/projects/string/catalog/bookings/string/confirm" \  -H "Content-Type: application/json" \  -d '{}'
{
  "$schema": "/api/v1/schemas/CatalogBooking.json",
  "agent_id": "string",
  "booking_id": "string",
  "conversation_id": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "external_ref": "string",
  "hold_expires_at": "2019-08-24T14:15:22Z",
  "item_id": "string",
  "kind": "string",
  "metadata": {
    "property1": null,
    "property2": null
  },
  "project_id": "string",
  "slot_id": "string",
  "status": "string",
  "tenant_id": "string",
  "updated_at": "2019-08-24T14:15:22Z",
  "user_id": "string"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Import catalog items from a CSV or XLSX file

POST
/projects/{projectId}/catalog/import
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

Query Parameters

item_type*string

Target item_type — a catalog_schemas entry must already exist for it

dry_run?boolean

If true, returns the proposed mapping + preview rows without writing anything

Defaultfalse
mapping?string

JSON-encoded []ColumnMapping to apply directly, skipping LLM proposal (required when dry_run=false unless a mapping was already confirmed client-side)

Request Body

multipart/form-data

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/projects/string/catalog/import?item_type=string"
{
  "$schema": "/api/v1/schemas/CatalogImportOutputBody.json",
  "mapping": [
    {
      "column": "string",
      "field": "string"
    }
  ],
  "preview": [
    {
      "$schema": "/api/v1/schemas/CatalogItem.json",
      "attributes": {
        "property1": null,
        "property2": null
      },
      "created_at": "2019-08-24T14:15:22Z",
      "currency": "string",
      "description": "string",
      "external_ref": "string",
      "is_active": true,
      "item_id": "string",
      "item_type": "string",
      "kb_node_id": "string",
      "media": [
        {
          "gcs_uri": "string",
          "kb_document_id": "string",
          "kind": "string"
        }
      ],
      "name": "string",
      "parent_item_id": "string",
      "price": 0.1,
      "price_unit": "string",
      "price_updated_at": "2019-08-24T14:15:22Z",
      "project_id": "string",
      "status": "string",
      "tenant_id": "string",
      "updated_at": "2019-08-24T14:15:22Z",
      "version": 0
    }
  ],
  "result": {
    "$schema": "/api/v1/schemas/CatalogSyncResult.json",
    "created": 0,
    "deactivated": 0,
    "item_ids": [
      "string"
    ],
    "updated": 0
  },
  "row_errors": [
    {
      "reason": "string",
      "row_index": 0
    }
  ]
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

List catalog items

GET
/projects/{projectId}/catalog/items
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

Query Parameters

item_type?string

Filter by item_type

status?string

Filter by status

limit?integer
Default100
Formatint64
Range1 <= value <= 500
offset?integer
Default0
Formatint64
Range0 <= value

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/projects/string/catalog/items"
{
  "$schema": "/api/v1/schemas/CatalogListItemsOutputBody.json",
  "items": [
    {
      "$schema": "/api/v1/schemas/CatalogItem.json",
      "attributes": {
        "property1": null,
        "property2": null
      },
      "created_at": "2019-08-24T14:15:22Z",
      "currency": "string",
      "description": "string",
      "external_ref": "string",
      "is_active": true,
      "item_id": "string",
      "item_type": "string",
      "kb_node_id": "string",
      "media": [
        {
          "gcs_uri": "string",
          "kb_document_id": "string",
          "kind": "string"
        }
      ],
      "name": "string",
      "parent_item_id": "string",
      "price": 0.1,
      "price_unit": "string",
      "price_updated_at": "2019-08-24T14:15:22Z",
      "project_id": "string",
      "status": "string",
      "tenant_id": "string",
      "updated_at": "2019-08-24T14:15:22Z",
      "version": 0
    }
  ]
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Create a catalog item

POST
/projects/{projectId}/catalog/items
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/projects/string/catalog/items" \  -H "Content-Type: application/json" \  -d '{    "item_type": "string",    "name": "string"  }'
{
  "$schema": "/api/v1/schemas/CatalogItem.json",
  "attributes": {
    "property1": null,
    "property2": null
  },
  "created_at": "2019-08-24T14:15:22Z",
  "currency": "string",
  "description": "string",
  "external_ref": "string",
  "is_active": true,
  "item_id": "string",
  "item_type": "string",
  "kb_node_id": "string",
  "media": [
    {
      "gcs_uri": "string",
      "kb_document_id": "string",
      "kind": "string"
    }
  ],
  "name": "string",
  "parent_item_id": "string",
  "price": 0.1,
  "price_unit": "string",
  "price_updated_at": "2019-08-24T14:15:22Z",
  "project_id": "string",
  "status": "string",
  "tenant_id": "string",
  "updated_at": "2019-08-24T14:15:22Z",
  "version": 0
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Idempotently upsert a batch of catalog items keyed by external_ref

PUT
/projects/{projectId}/catalog/items/sync
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X PUT "https://loading/api/v1/projects/string/catalog/items/sync" \  -H "Content-Type: application/json" \  -d '{    "items": [      {        "external_ref": "string",        "item_type": "string",        "name": "string"      }    ]  }'
{
  "$schema": "/api/v1/schemas/CatalogSyncResult.json",
  "created": 0,
  "deactivated": 0,
  "item_ids": [
    "string"
  ],
  "updated": 0
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Get a catalog item

GET
/projects/{projectId}/catalog/items/{itemId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

itemId*string

Catalog item UUID

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/projects/string/catalog/items/string"
{
  "$schema": "/api/v1/schemas/CatalogItem.json",
  "attributes": {
    "property1": null,
    "property2": null
  },
  "created_at": "2019-08-24T14:15:22Z",
  "currency": "string",
  "description": "string",
  "external_ref": "string",
  "is_active": true,
  "item_id": "string",
  "item_type": "string",
  "kb_node_id": "string",
  "media": [
    {
      "gcs_uri": "string",
      "kb_document_id": "string",
      "kind": "string"
    }
  ],
  "name": "string",
  "parent_item_id": "string",
  "price": 0.1,
  "price_unit": "string",
  "price_updated_at": "2019-08-24T14:15:22Z",
  "project_id": "string",
  "status": "string",
  "tenant_id": "string",
  "updated_at": "2019-08-24T14:15:22Z",
  "version": 0
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Update a catalog item

PATCH
/projects/{projectId}/catalog/items/{itemId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

itemId*string

Catalog item UUID

Query Parameters

version*integer

Expected current version (optimistic concurrency)

Formatint64

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X PATCH "https://loading/api/v1/projects/string/catalog/items/string?version=0" \  -H "Content-Type: application/json" \  -d '{    "item_type": "string",    "name": "string"  }'
{
  "$schema": "/api/v1/schemas/CatalogItem.json",
  "attributes": {
    "property1": null,
    "property2": null
  },
  "created_at": "2019-08-24T14:15:22Z",
  "currency": "string",
  "description": "string",
  "external_ref": "string",
  "is_active": true,
  "item_id": "string",
  "item_type": "string",
  "kb_node_id": "string",
  "media": [
    {
      "gcs_uri": "string",
      "kb_document_id": "string",
      "kind": "string"
    }
  ],
  "name": "string",
  "parent_item_id": "string",
  "price": 0.1,
  "price_unit": "string",
  "price_updated_at": "2019-08-24T14:15:22Z",
  "project_id": "string",
  "status": "string",
  "tenant_id": "string",
  "updated_at": "2019-08-24T14:15:22Z",
  "version": 0
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Deactivate a catalog item

DELETE
/projects/{projectId}/catalog/items/{itemId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

itemId*string

Catalog item UUID

Response Body

application/problem+json

curl -X DELETE "https://loading/api/v1/projects/string/catalog/items/string"
Empty
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

List an item's viewing slots

GET
/projects/{projectId}/catalog/items/{itemId}/slots
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

itemId*string

Catalog item UUID

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/projects/string/catalog/items/string/slots"
{
  "$schema": "/api/v1/schemas/CatalogListSlotsOutputBody.json",
  "slots": [
    {
      "$schema": "/api/v1/schemas/CatalogSlot.json",
      "booked_count": 0,
      "capacity": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "ends_at": "2019-08-24T14:15:22Z",
      "item_id": "string",
      "project_id": "string",
      "slot_id": "string",
      "starts_at": "2019-08-24T14:15:22Z",
      "status": "string",
      "tenant_id": "string",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ]
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Create a viewing slot for an item

POST
/projects/{projectId}/catalog/items/{itemId}/slots
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

itemId*string

Catalog item UUID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/projects/string/catalog/items/string/slots" \  -H "Content-Type: application/json" \  -d '{    "ends_at": "string",    "starts_at": "string"  }'
{
  "$schema": "/api/v1/schemas/CatalogSlot.json",
  "booked_count": 0,
  "capacity": 0,
  "created_at": "2019-08-24T14:15:22Z",
  "ends_at": "2019-08-24T14:15:22Z",
  "item_id": "string",
  "project_id": "string",
  "slot_id": "string",
  "starts_at": "2019-08-24T14:15:22Z",
  "status": "string",
  "tenant_id": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Update a catalog item's status

PATCH
/projects/{projectId}/catalog/items/{itemId}/status
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

itemId*string

Catalog item UUID

Query Parameters

version*integer

Expected current version (optimistic concurrency)

Formatint64

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

status*string

Response Body

application/json

application/problem+json

curl -X PATCH "https://loading/api/v1/projects/string/catalog/items/string/status?version=0" \  -H "Content-Type: application/json" \  -d '{    "status": "string"  }'
{
  "$schema": "/api/v1/schemas/CatalogItem.json",
  "attributes": {
    "property1": null,
    "property2": null
  },
  "created_at": "2019-08-24T14:15:22Z",
  "currency": "string",
  "description": "string",
  "external_ref": "string",
  "is_active": true,
  "item_id": "string",
  "item_type": "string",
  "kb_node_id": "string",
  "media": [
    {
      "gcs_uri": "string",
      "kb_document_id": "string",
      "kind": "string"
    }
  ],
  "name": "string",
  "parent_item_id": "string",
  "price": 0.1,
  "price_unit": "string",
  "price_updated_at": "2019-08-24T14:15:22Z",
  "project_id": "string",
  "status": "string",
  "tenant_id": "string",
  "updated_at": "2019-08-24T14:15:22Z",
  "version": 0
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

List catalog schemas

GET
/projects/{projectId}/catalog/schemas
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/projects/string/catalog/schemas"
{
  "$schema": "/api/v1/schemas/CatalogListSchemasOutputBody.json",
  "schemas": [
    {
      "$schema": "/api/v1/schemas/CatalogSchema.json",
      "created_at": "2019-08-24T14:15:22Z",
      "fields": [
        {
          "description": "string",
          "enum_values": [
            "string"
          ],
          "filterable": true,
          "key": "string",
          "required": true,
          "type": "string",
          "unit": "string"
        }
      ],
      "item_type": "string",
      "project_id": "string",
      "schema_id": "string",
      "tenant_id": "string",
      "updated_at": "2019-08-24T14:15:22Z",
      "version": 0
    }
  ]
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Define the attribute schema for an item_type

POST
/projects/{projectId}/catalog/schemas
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/projects/string/catalog/schemas" \  -H "Content-Type: application/json" \  -d '{    "fields": [      {        "key": "string",        "type": "string"      }    ],    "item_type": "string"  }'
{
  "$schema": "/api/v1/schemas/CatalogSchema.json",
  "created_at": "2019-08-24T14:15:22Z",
  "fields": [
    {
      "description": "string",
      "enum_values": [
        "string"
      ],
      "filterable": true,
      "key": "string",
      "required": true,
      "type": "string",
      "unit": "string"
    }
  ],
  "item_type": "string",
  "project_id": "string",
  "schema_id": "string",
  "tenant_id": "string",
  "updated_at": "2019-08-24T14:15:22Z",
  "version": 0
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Get a catalog schema

GET
/projects/{projectId}/catalog/schemas/{schemaId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

schemaId*string

Catalog schema UUID

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/projects/string/catalog/schemas/string"
{
  "$schema": "/api/v1/schemas/CatalogSchema.json",
  "created_at": "2019-08-24T14:15:22Z",
  "fields": [
    {
      "description": "string",
      "enum_values": [
        "string"
      ],
      "filterable": true,
      "key": "string",
      "required": true,
      "type": "string",
      "unit": "string"
    }
  ],
  "item_type": "string",
  "project_id": "string",
  "schema_id": "string",
  "tenant_id": "string",
  "updated_at": "2019-08-24T14:15:22Z",
  "version": 0
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Update a catalog schema's fields

PATCH
/projects/{projectId}/catalog/schemas/{schemaId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

schemaId*string

Catalog schema UUID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X PATCH "https://loading/api/v1/projects/string/catalog/schemas/string" \  -H "Content-Type: application/json" \  -d '{    "fields": [      {        "key": "string",        "type": "string"      }    ]  }'
{
  "$schema": "/api/v1/schemas/CatalogSchema.json",
  "created_at": "2019-08-24T14:15:22Z",
  "fields": [
    {
      "description": "string",
      "enum_values": [
        "string"
      ],
      "filterable": true,
      "key": "string",
      "required": true,
      "type": "string",
      "unit": "string"
    }
  ],
  "item_type": "string",
  "project_id": "string",
  "schema_id": "string",
  "tenant_id": "string",
  "updated_at": "2019-08-24T14:15:22Z",
  "version": 0
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Delete a catalog schema

DELETE
/projects/{projectId}/catalog/schemas/{schemaId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

schemaId*string

Catalog schema UUID

Response Body

application/problem+json

curl -X DELETE "https://loading/api/v1/projects/string/catalog/schemas/string"
Empty
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Get a catalog slot

GET
/projects/{projectId}/catalog/slots/{slotId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

slotId*string

Catalog slot UUID

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/projects/string/catalog/slots/string"
{
  "$schema": "/api/v1/schemas/CatalogSlot.json",
  "booked_count": 0,
  "capacity": 0,
  "created_at": "2019-08-24T14:15:22Z",
  "ends_at": "2019-08-24T14:15:22Z",
  "item_id": "string",
  "project_id": "string",
  "slot_id": "string",
  "starts_at": "2019-08-24T14:15:22Z",
  "status": "string",
  "tenant_id": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Update a catalog slot

PATCH
/projects/{projectId}/catalog/slots/{slotId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

slotId*string

Catalog slot UUID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X PATCH "https://loading/api/v1/projects/string/catalog/slots/string" \  -H "Content-Type: application/json" \  -d '{    "capacity": 0,    "ends_at": "string",    "starts_at": "string",    "status": "string"  }'
{
  "$schema": "/api/v1/schemas/CatalogSlot.json",
  "booked_count": 0,
  "capacity": 0,
  "created_at": "2019-08-24T14:15:22Z",
  "ends_at": "2019-08-24T14:15:22Z",
  "item_id": "string",
  "project_id": "string",
  "slot_id": "string",
  "starts_at": "2019-08-24T14:15:22Z",
  "status": "string",
  "tenant_id": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Delete a catalog slot

DELETE
/projects/{projectId}/catalog/slots/{slotId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

slotId*string

Catalog slot UUID

Response Body

application/problem+json

curl -X DELETE "https://loading/api/v1/projects/string/catalog/slots/string"
Empty
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}