The Cobi Data API is the foundation for all data integration with the Cobi
platform.
API Structure
All Data API endpoints follow the same URL pattern::type is one of:
1
Customers
Upload customer profile information
2
Transactions
Upload transaction records with savings and discounts
3
Offers
Upload offer details for promotions and discounts
4
Shops
Upload shop information
5
Branches
Upload branch information (requires shops to exist first)
6
Categories
Upload category information for product classification
7
Shop Categories
Upload shop-category associations (requires shops and categories to exist
first)
8
Institutes
Upload educational institution information
9
Courses
Upload course information
10
Tags
Upload tag information
11
Shop Tags
Upload shop-tag associations (requires shops and tags to exist first)
12
Keywords
Upload keyword information
13
Shop Keywords
Upload shop-keyword associations (requires shops and keywords to exist
first)
14
Student Favourites
Upload student-favourites associations (requires customer and shops to exist
first)
15
Interactions
Record user interactions with items (TAG, OFFER, SHOP) for analytics
Data Dependencies: Some data types have dependencies on other types. For
example, branches require valid shop_id references. It’s important to upload
data in the correct order: 1. Upload shops first 2. Then upload branches that
reference those shops
Common Features
Batch Processing
Batch Processing
Each endpoint accepts a batch of records (up to 5000) in a single request:This batch processing capability allows for efficient data uploads and reduces the number of API calls needed.
Authentication
Authentication
All endpoints require API key authentication via the Authorization header:
Contact our support team to obtain your API key.
Response Format
Response Format
All endpoints return a consistent response format:
| Field | Type | Description |
|---|---|---|
request_id | string | Unique ID for the overall request |
type | string | Type of data being processed (e.g., “branches”) |
batches | array | Array of batch results |
batches[].batch | int | Sequential batch number |
batches[].status | int | HTTP-like status code (200, 207, 400, 500) |
batches[].data | object | Batch result details |
batches[].data.status | string | ”success”, “partial”, or “error” |
batches[].data.type | string | Matches the top-level type |
batches[].data.message | string | Summary message of the batch result |
batches[].data.request_id | string | Unique request ID for the batch |
batches[].data.batch_id | string | Unique batch ID |
batches[].data.error | string | Error details (empty or null on success) |
Available Endpoints
Customers
Upload customer profile records with demographic and identification details
Transactions
Upload transaction records with savings, discounts, and purchase information
Offers
Upload offer details including validity periods and restrictions
Shops
Upload shop information including location and visibility settings
Branches
Upload branch information with location coordinates and shop association
Categories
Upload category information for product classification and organization
Shop Categories
Upload shop-category associations to organize shops by category
Institutes
Upload educational institution information including region and status
Courses
Upload course information with official names and status
Interactions
Record user interactions with items (TAG, OFFER, SHOP) for analytics
Best Practices
- Performance
- Data Quality
- Security
- Upload up to 5000 records at a time for optimal performance - Consider scheduling regular batch uploads rather than individual API calls - Implement retry logic with exponential backoff for failed requests