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.
Authorization: Bearer <key_id>.<secret>
# Example
Authorization: Bearer mk_test_abc123.9f2e8c.../meReseller, site, tier, key environment, and sandbox status.
Example
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
"https://partner.invoicemate.in/api/v1/me"/usageRequest / error counts for this API key.
Example
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
"https://partner.invoicemate.in/api/v1/usage"/healthPublic liveness check (no auth required).
Example
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
9001–9010 - Confirm never changes real inventory · stock is private per reseller
- Sandbox order numbers are prefixed
SBX- - Tier pricing applies exactly as in live
| Product | Why it exists |
|---|---|
| 9009 Krishna Leela | Always zero stock → INSUFFICIENT_STOCK |
| 9008 Dancing Forms | Exactly one unit — concurrent reservation tests |
| 9007 Himalayan Dawn | Only four units — low-stock behaviour |
| 9002 · 9005 · 9010 | Customizable / unframed / varied orientations |
/sandboxDescribes the fixture and your current sandbox stock.
Example
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
"https://partner.invoicemate.in/api/v1/sandbox"/sandbox/resetDeletes your sandbox orders and restores fixture stock.
Example
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)
# 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/reset03
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.
Dashboard → API Keys → create a test key. Stored only in this browser tab.
Fixture catalog + your current sandbox stock
Response
04
Products
/productsList 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 -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
"https://partner.invoicemate.in/api/v1/products?search=…"/products/{id}Single product with images and tier price.
Example
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
"https://partner.invoicemate.in/api/v1/products/{id}"/products/bulkBody
{ "ids": [9001, 9002, 9003] }Example
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"/products/syncDelta sync for partner catalogs.
Query · updated_since, cursor, limit
Example
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
"https://partner.invoicemate.in/api/v1/products/sync?updated_since=…"/products/statsExample
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
"https://partner.invoicemate.in/api/v1/products/stats"/products/{id}/availabilityExample
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
"https://partner.invoicemate.in/api/v1/products/{id}/availability"/products/availabilityBody
{ "ids": [9001, 9008] }Example
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"/categoriesExample
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
"https://partner.invoicemate.in/api/v1/categories"/artistsExample
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
"https://partner.invoicemate.in/api/v1/artists"/filtersExample
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.
/orders/quoteBody
{ "items": [{ "product_id": 9001, "quantity": 1, "unit_sale_price": 15000 }] }Example
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"/orders/reserveBody
{ "items": [{ "product_id": 9001, "quantity": 1 }], "customer": { "name": "Ada", "email": "ada@example.com", "external_customer_id": "c1" }, "reseller_order_ref": "ORD-99" }Example
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"/orders/{id}/confirmCommit reservation and decrement inventory (sandbox stock only for test keys).
Example
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"/ordersNotes
Same payload as reserve — creates and confirms in one call.
Example
curl -s -X POST \
-H "Authorization: Bearer mk_test_xxx.SECRET" \
-H "Content-Type: application/json" \
"https://partner.invoicemate.in/api/v1/orders"/ordersQuery · status, page, search
Example
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
"https://partner.invoicemate.in/api/v1/orders?status=…"/orders/{id}Example
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
"https://partner.invoicemate.in/api/v1/orders/{id}"/orders/by-ref/{ref}Example
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
"https://partner.invoicemate.in/api/v1/orders/by-ref/{ref}"/orders/{id}/trackingExample
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
"https://partner.invoicemate.in/api/v1/orders/{id}/tracking"06
Customers
/customersBody
{ "external_customer_id": "u_1", "name": "Ada", "email": "a@b.com" }Example
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"/customersExample
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
"https://partner.invoicemate.in/api/v1/customers"/customers/{id}Example
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
"https://partner.invoicemate.in/api/v1/customers/{id}"/customers/{id}Body
{ "name": "Ada L." }Example
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}"/customers/{id}/ordersExample
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.
/webhooksCurrent webhook config for this API key’s site.
Example
curl -s -H "Authorization: Bearer mk_test_xxx.SECRET" \
"https://partner.invoicemate.in/api/v1/webhooks"/webhooksBody
{ "webhook_url": "https://yoursite.com/hooks/invoicemate" }Example
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"/webhooks/testEnqueue a signed test delivery to your configured URL.
Example
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
{
"success": true,
"data": { /* endpoint payload */ },
"meta": { "request_id": "req_…" },
"error": null
}Error envelope
{
"success": false,
"data": null,
"meta": { "request_id": "req_…" },
"error": {
"code": "INSUFFICIENT_STOCK",
"message": "Product 9009 is out of stock",
"details": null
}
}| Code | HTTP | Meaning |
|---|---|---|
| UNAUTHORIZED | 401 | Bad or missing key |
| KEY_REVOKED | 401 | Key was revoked |
| KEY_EXPIRED | 401 | Key past expiry |
| FORBIDDEN | 403 | Action not allowed (e.g. sandbox on live key) |
| SCOPE_DENIED | 403 | Missing required scope |
| NOT_FOUND | 404 | Resource does not exist for this reseller |
| BAD_REQUEST | 400 | Malformed request |
| VALIDATION_ERROR | 422 | Bad payload / missing fields |
| RATE_LIMITED | 429 | Too many requests for this API group |
| INSUFFICIENT_STOCK | 409 | Not enough quantity |
| ORDER_STATE_INVALID | 409 | Wrong order status for action |
| IDEMPOTENCY_CONFLICT | 409 | Same Idempotency-Key, different body |
| INTERNAL_ERROR | 500 / 503 | Unexpected 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 -s -H "Authorization: Bearer mk_live_xxx.SECRET" \
"https://partner.invoicemate.in/api/v1/products?limit=5"