API reference

Build on InvoiceMate Partners

Authenticated reseller APIs for catalog sync, availability, customers, and orders — with a real sandbox you can hit from this page.

Bearer keys

mk_test_ for sandbox, mk_live_ for production. Same paths either way.

Safe sandbox

Fixed products 9001–9010. Confirm never moves real inventory.

Stable envelope

{ success, data, meta, error } on every response.

Base URLhttps://partner.invoicemate.in/api/v1

Hosted at https://partner.invoicemate.in. Register at https://partner.invoicemate.in/dashboard/register.

01

Authentication

Send your key as a Bearer token. Optional on writes: Idempotency-Key. Responses include X-Environment, X-RateLimit-*, and X-Request-Id.

http
Authorization: Bearer <key_id>.<secret>
# Example
Authorization: Bearer mk_test_abc123.9f2e8c...
GET/me

Reseller, site, tier, key environment, and sandbox status.

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/me"
GET/usage

Request / error counts for this API key.

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/usage"
GET/health

Public liveness check (no auth required).

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/health"

02

Sandbox

Create a test key in the partner dashboard. Every endpoint below switches to a fixed ten-product catalog — same paths, schemas, and errors as live. Go live by swapping the key.

  • Catalog ids 90019010
  • Confirm never changes real inventory · stock is private per reseller
  • Sandbox order numbers are prefixed SBX-
  • Tier pricing applies exactly as in live
ProductWhy it exists
9009 Krishna LeelaAlways zero stock → INSUFFICIENT_STOCK
9008 Dancing FormsExactly one unit — concurrent reservation tests
9007 Himalayan DawnOnly four units — low-stock behaviour
9002 · 9005 · 9010Customizable / unframed / varied orientations
GET/sandbox

Describes the fixture and your current sandbox stock.

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/sandbox"
POST/sandbox/reset

Deletes your sandbox orders and restores fixture stock.

Example

curl
curl -s -X POST \
  -H "Authorization: Bearer mk_test_xxx.SECRET" \
  -H "Content-Type: application/json" \
  "https://partner.invoicemate.in/api/v1/sandbox/reset"

Quickstart (public URLs)

bash
# 1. Fixture + your sandbox stock
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  https://partner.invoicemate.in/api/v1/sandbox

# 2. Browse via the normal products API
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/products?limit=10"

# 3. Place and confirm (real stock untouched)
curl -s -X POST -H "Authorization: Bearer mk_test_xxx.SECRET" \
  -H "Content-Type: application/json" \
  -d '{"items":[{"product_id":9001,"quantity":2}],"customer":{"name":"Ada","email":"ada@example.com"},"reseller_order_ref":"TEST-1"}' \
  https://partner.invoicemate.in/api/v1/orders

# 4. Error path
curl -s -X POST -H "Authorization: Bearer mk_test_xxx.SECRET" \
  -H "Content-Type: application/json" \
  -d '{"items":[{"product_id":9009,"quantity":1}]}' \
  https://partner.invoicemate.in/api/v1/orders
# → 409 INSUFFICIENT_STOCK

# 5. Reset
curl -s -X POST -H "Authorization: Bearer mk_test_xxx.SECRET" \
  https://partner.invoicemate.in/api/v1/sandbox/reset

03

Try it live

Paste a test key and run sandbox requests without leaving the docs. Production samples below still use https://partner.invoicemate.in/api/v1.

Live sandbox

Hit the API from this page

Requests go to https://partner.invoicemate.in/api/v1 on this host. Examples in the docs use the public URL https://partner.invoicemate.in/api/v1.

Test keys only · no live stock

Dashboard → API Keys → create a test key. Stored only in this browser tab.

Fixture catalog + your current sandbox stock

GET /sandbox

Response

Response JSON appears here after you send a request.

04

Products

GET/products

List priced products for your tier. Includes location_id for invoicing.

Query · search, art_category_id, min_price, max_price, min_height, max_width, orientation, is_framed, is_customizable, artist_name, in_stock, sort_by, limit, cursor, page, updated_since, ids

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/products?search=…"
GET/products/{id}

Single product with images and tier price.

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/products/{id}"
POST/products/bulk

Body

json
{ "ids": [9001, 9002, 9003] }

Example

curl
curl -s -X POST \
  -H "Authorization: Bearer mk_test_xxx.SECRET" \
  -H "Content-Type: application/json" \
  -d '{ "ids": [9001, 9002, 9003] }' \
  "https://partner.invoicemate.in/api/v1/products/bulk"
GET/products/sync

Delta sync for partner catalogs.

Query · updated_since, cursor, limit

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/products/sync?updated_since=…"
GET/products/stats

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/products/stats"
GET/products/{id}/availability

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/products/{id}/availability"
POST/products/availability

Body

json
{ "ids": [9001, 9008] }

Example

curl
curl -s -X POST \
  -H "Authorization: Bearer mk_test_xxx.SECRET" \
  -H "Content-Type: application/json" \
  -d '{ "ids": [9001, 9008] }' \
  "https://partner.invoicemate.in/api/v1/products/availability"
GET/categories

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/categories"
GET/artists

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/artists"
GET/filters

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/filters"

05

Orders

Prefer quote → reserve → confirm, or use one-shot POST /orders.

POST/orders/quote

Body

json
{ "items": [{ "product_id": 9001, "quantity": 1, "unit_sale_price": 15000 }] }

Example

curl
curl -s -X POST \
  -H "Authorization: Bearer mk_test_xxx.SECRET" \
  -H "Content-Type: application/json" \
  -d '{ "items": [{ "product_id": 9001, "quantity": 1, "unit_sale_price": 15000 }] }' \
  "https://partner.invoicemate.in/api/v1/orders/quote"
POST/orders/reserve

Body

json
{ "items": [{ "product_id": 9001, "quantity": 1 }], "customer": { "name": "Ada", "email": "ada@example.com", "external_customer_id": "c1" }, "reseller_order_ref": "ORD-99" }

Example

curl
curl -s -X POST \
  -H "Authorization: Bearer mk_test_xxx.SECRET" \
  -H "Content-Type: application/json" \
  -d '{ "items": [{ "product_id": 9001, "quantity": 1 }], "customer": { "name": "Ada", "email": "ada@example.com", "external_customer_id": "c1" }, "reseller_order_ref": "ORD-99" }' \
  "https://partner.invoicemate.in/api/v1/orders/reserve"
POST/orders/{id}/confirm

Commit reservation and decrement inventory (sandbox stock only for test keys).

Example

curl
curl -s -X POST \
  -H "Authorization: Bearer mk_test_xxx.SECRET" \
  -H "Content-Type: application/json" \
  "https://partner.invoicemate.in/api/v1/orders/{id}/confirm"
POST/orders

Notes

Same payload as reserve — creates and confirms in one call.

Example

curl
curl -s -X POST \
  -H "Authorization: Bearer mk_test_xxx.SECRET" \
  -H "Content-Type: application/json" \
  "https://partner.invoicemate.in/api/v1/orders"
GET/orders

Query · status, page, search

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/orders?status=…"
GET/orders/{id}

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/orders/{id}"
GET/orders/by-ref/{ref}

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/orders/by-ref/{ref}"
GET/orders/{id}/tracking

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/orders/{id}/tracking"

06

Customers

POST/customers

Body

json
{ "external_customer_id": "u_1", "name": "Ada", "email": "a@b.com" }

Example

curl
curl -s -X POST \
  -H "Authorization: Bearer mk_test_xxx.SECRET" \
  -H "Content-Type: application/json" \
  -d '{ "external_customer_id": "u_1", "name": "Ada", "email": "a@b.com" }' \
  "https://partner.invoicemate.in/api/v1/customers"
GET/customers

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/customers"
GET/customers/{id}

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/customers/{id}"
PATCH/customers/{id}

Body

json
{ "name": "Ada L." }

Example

curl
curl -s -X PATCH \
  -H "Authorization: Bearer mk_test_xxx.SECRET" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Ada L." }' \
  "https://partner.invoicemate.in/api/v1/customers/{id}"
GET/customers/{id}/orders

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/customers/{id}/orders"

07

Webhooks

Events: order.reserved, order.confirmed, order.shipped, order.delivered, webhook.test. Signed with X-MM-Signature = HMAC-SHA256 of timestamp.payload.

GET/webhooks

Current webhook config for this API key’s site.

Example

curl
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/webhooks"
POST/webhooks

Body

json
{ "webhook_url": "https://yoursite.com/hooks/invoicemate" }

Example

curl
curl -s -X POST \
  -H "Authorization: Bearer mk_test_xxx.SECRET" \
  -H "Content-Type: application/json" \
  -d '{ "webhook_url": "https://yoursite.com/hooks/invoicemate" }' \
  "https://partner.invoicemate.in/api/v1/webhooks"
POST/webhooks/test

Enqueue a signed test delivery to your configured URL.

Example

curl
curl -s -X POST \
  -H "Authorization: Bearer mk_test_xxx.SECRET" \
  -H "Content-Type: application/json" \
  "https://partner.invoicemate.in/api/v1/webhooks/test"

08

Errors & rate limits

Every response uses the same envelope. Success sets success: true and error: null. Failures set success: false, data: null, and an error object.

Success envelope

json
{
  "success": true,
  "data": { /* endpoint payload */ },
  "meta": { "request_id": "req_…" },
  "error": null
}

Error envelope

json
{
  "success": false,
  "data": null,
  "meta": { "request_id": "req_…" },
  "error": {
    "code": "INSUFFICIENT_STOCK",
    "message": "Product 9009 is out of stock",
    "details": null
  }
}
CodeHTTPMeaning
UNAUTHORIZED401Bad or missing key
KEY_REVOKED401Key was revoked
KEY_EXPIRED401Key past expiry
FORBIDDEN403Action not allowed (e.g. sandbox on live key)
SCOPE_DENIED403Missing required scope
NOT_FOUND404Resource does not exist for this reseller
BAD_REQUEST400Malformed request
VALIDATION_ERROR422Bad payload / missing fields
RATE_LIMITED429Too many requests for this API group
INSUFFICIENT_STOCK409Not enough quantity
ORDER_STATE_INVALID409Wrong order status for action
IDEMPOTENCY_CONFLICT409Same Idempotency-Key, different body
INTERNAL_ERROR500 / 503Unexpected server / DB failure

Rate limits are set per partner tier and API group (products, orders, customers, webhooks). Defaults seed at 60/min and 10,000/day for *; admins adjust under Pricing. Watch X-RateLimit-Group on every response. Open any endpoint card above and use the Success / Errors tabs for full JSON examples.

09

Code samples

All samples target https://partner.invoicemate.in/api/v1.

curl
curl -s -H "Authorization: Bearer mk_live_xxx.SECRET" \
  "https://partner.invoicemate.in/api/v1/products?limit=5"