Skip to main content
PATCH

Authorizations

Authorization
string
header
required

API Key Authentication

Use your API key in the Authorization header:

Key Types:

Secret Keys (Server-Side Only):

  • Format: tybrite_sk_live_* (production) or tybrite_sk_test_* (sandbox)
  • Full read/write access to all endpoints
  • ⚠️ NEVER expose in client-side code or public repositories
  • Required for: write operations, authentication, payment verification, AI recommendations

Publishable Keys (Client-Safe):

  • Format: tybrite_pk_live_* (production) or tybrite_pk_test_* (sandbox)
  • Read-only access (GET requests only, plus POST semantic search)
  • βœ… Safe for client-side JavaScript, mobile apps, and public code
  • Allowed for: browsing products, search, CMS content, pricing queries

Endpoint-Specific Requirements:

  • Authentication endpoints (/v1/auth/*): Secret key required
  • Payment verification (POST /v1/payments/verify): Secret key required
  • AI Recommendations (POST /v1/recommendations): Secret key required
  • Semantic Search (POST /v1/search): Both key types allowed (read-only operation)
  • All write operations: Secret key required
  • All read operations: Both key types allowed

Using a publishable key for restricted operations returns 403 Forbidden.

Headers

Idempotency-Key
string
required

Unique key to prevent duplicate updates (e.g., update-{operation}-{order_id}-{timestamp})

X-Timestamp
integer
required

Unix timestamp in seconds (current time). Must be within 5 minutes of server time. Used to prevent replay attacks.

X-Signature
string
required

HMAC-SHA256 signature of the payload (timestamp + "." + request_body), base64-encoded. Sign using your HMAC secret from the Integrations page (Developer section).

Path Parameters

id
string<uuid>
required

Order UUID

Body

application/json
payment_status
enum<string>

Payment status

Available options:
pending,
paid,
failed,
refunded
Example:

"paid"

order_status
enum<string>

Order fulfillment status

Available options:
pending,
processing,
shipped,
delivered,
cancelled
Example:

"processing"

notes
string

Additional order notes

Example:

"Customer requested gift wrapping"

tracking_number
string

Shipping tracking number

Example:

"1Z999AA10123456784"

estimated_delivery
string<date-time>

Estimated delivery date and time

Example:

"2026-02-15T14:00:00Z"

shipped_at
string<date-time>

Timestamp when order was shipped

Example:

"2026-02-10T10:30:00Z"

delivered_at
string<date-time>

Timestamp when order was delivered

Example:

"2026-02-15T14:30:00Z"

Response

Order updated successfully

id
string<uuid>
order_number
string
Example:

"ORD-2026-001234"

customer_id
string<uuid>
customer_email
string<email>
customer_phone
string
customer_name
string
order_status
enum<string>
Available options:
pending,
processing,
shipped,
delivered,
cancelled
Example:

"pending"

payment_status
enum<string>
Available options:
pending,
paid,
failed,
refunded
Example:

"pending"

payment_method
enum<string>

Method used for payment

Available options:
stripe,
paypal,
paystack,
mpesa,
cash,
bank_transfer
Example:

"stripe"

payment_reference
string
subtotal
number<float>
Example:

1999.98

tax_amount
number<float>
Example:

159.99

tax_breakdown
object[] | null

Per-jurisdiction tax detail when tax was calculated automatically for the shipping destination (one entry per taxing jurisdiction). Null when a flat store rate was used.

tax_source
enum<string> | null

How the tax figure was produced β€” automatic (jurisdiction-accurate calculation for the destination), fallback (automatic calculation was unavailable, so the store's configured rate was used), or manual (the store's configured rate).

Available options:
automatic,
fallback,
manual,
null
Example:

"automatic"

shipping_amount
number<float>
Example:

15

discount_amount
number<float>
Example:

0

total_amount
number<float>
Example:

2174.97

billing_address
object
shipping_address
object
items
object[]
notes
string
tracking_number
string
estimated_delivery
string<date-time>
shipped_at
string<date-time>
delivered_at
string<date-time>
created_at
string<date-time>
updated_at
string<date-time>
environment
enum<string>

Whether this order was created in the live or test environment. Sandbox orders are isolated from production data.

Available options:
production,
sandbox
Example:

"production"

shipping_metadata
object | null

Complete shipping calculation details for audit trail