- Customization and development
Bulk updates
Bulk update endpoints let you process large pricing and discount workloads in fewer API calls. OrderCloud accepts each request, creates a bulk job, and processes items asynchronously. Currently the only supported resources are price schedules, discounts, and discount assignments, all of which are covered in this document. Additional resources might be added in the future.
This feature is currently in beta. Behavior and properties might change before general availability.
Bulk endpoints
| Resource | Operation | Endpoint | Description |
|---|---|---|---|
| Price schedules | Upsert | POST /v1/bulk/priceschedules/upsert | Create or update price schedules in bulk. |
| Price schedules | Delete | POST /v1/bulk/priceschedules/delete | Delete price schedules in bulk by ID. |
| Discounts | Upsert | POST /v1/bulk/discounts/upsert | Create or update discounts in bulk. |
| Discounts | Delete | POST /v1/bulk/discounts/delete | Delete discounts in bulk by ID. |
| Discount assignments | Upsert | POST /v1/bulk/discounts/assignments/upsert | Create or update discount assignments in bulk. |
| Discount assignments | Delete | POST /v1/bulk/discounts/assignments/delete | Delete discount assignments in bulk by composite key (DiscountID + BuyerID or BuyerGroupID). |
All endpoints return 202 Accepted with job metadata.
Common bulk behavior
Asynchronous job processing
Each bulk request returns an initial job descriptor.
To track progress, call:
Example response:
Jobs remain queryable for 24 hours after completion.
Error retrieval
To retrieve indexed item errors, call:
If no items fail, the response is an empty array:
Example error payload:
Each error object includes:
ItemIndex: Zero-based index from the original request.ErrorCode: Standardized error code.Message: Human-readable error message.Data: Optional context for the failure.
Limits
| Limit | Value |
|---|---|
| Maximum items per request | 50,000 |
| Maximum payload size | 25 MB |
| Concurrent running jobs | 2 |
If payload size exceeds the limit, the API returns 400 with Bulk.PayloadTooLarge.
You can submit more than two jobs, but only two jobs run at the same time per marketplace. Additional jobs remain queued.
Use gzip compression for large payloads to reduce request size and upload time.
Price schedule bulk operations
Upsert price schedules
Each item is a full price schedule object.
Behavior:
- If the ID does not exist, OrderCloud creates the price schedule.
- If the ID exists, OrderCloud updates the price schedule (PUT-style replacement).
- OrderCloud replaces the full
PriceBreaksarray. - If provided, OrderCloud applies default assignment fields after save.
Default assignment fields for price schedules
Use DefaultForProductID and DefaultForSupplierID to set defaults during upsert.
| Combination | Result |
|---|---|
DefaultForProductID only | Sets Product.DefaultPriceScheduleID. |
DefaultForProductID and DefaultForSupplierID | Sets ProductSupplier.DefaultPriceScheduleID for that supplier on that product. |
DefaultForSupplierID only | Invalid. Returns a validation error. |
| Neither field | Standard upsert without default assignment. |
Validation and ownership rules:
- Referenced product and supplier objects must exist, or the item returns
NotFound. - For supplier-owned schedules, ownership must match the supplier or marketplace owner, or the item returns
InvalidDefaultPriceScheduleID. - If the default is already set, OrderCloud skips the write.
- These fields do not change schedule ownership.
Delete price schedules
Behavior:
- OrderCloud deletes each ID independently.
- Missing IDs return
NotFoundfor those items.
Discount bulk operations
Upsert discounts
Each item is a full discount object.
Behavior:
- If the ID does not exist, OrderCloud creates the discount.
- If the ID exists, OrderCloud updates the discount (PUT-style replacement).
- OrderCloud validates all break and scope rules per item.
Delete discounts
Behavior:
- OrderCloud deletes each ID independently.
- Missing IDs return
NotFoundfor those items.
Discount assignment bulk operations
Upsert discount assignments
Each item must follow discount assignment rules.
- Buyer group assignment:
DiscountIDandBuyerGroupID - Buyer assignment:
DiscountIDandBuyerID - User group assignment:
DiscountID,BuyerID, andUserGroupID
Delete discount assignments
Each item identifies one assignment to remove.
Behavior:
- If both the discount and party exist, but no assignment exists, this error is caught and the request is ignored.
- If either the discount or the party does not exist, this error is surfaced in the error payload.
Authorization
| Role | Access |
|---|---|
PriceScheduleAdmin | Full access to bulk upsert and delete operations for price schedules, discounts, and discount assignments. |
PriceScheduleReader | Read-only access to bulk jobs and bulk job errors. |