- Store API
- Admin API
- Auth
- Batch Jobs
- Currencies
- Customers
- Customer Groups
- Discounts
- Draft Orders
- Gift Cards
- Inventory Items
- Invites
- Notes
- Notifications
- Orders
- Create a Reservation
- Cancel Claim's Fulfillment
- Ship a Claim's Fulfillment
- Cancel Swap's Fulfilmment
- Get Order Reservations
- Add a Shipping Method
- Create a Refund
- Get an Order
- Update an Order
- Create a Fulfillment
- Cancel a Swap
- List Orders
- Create a Swap
- Complete an Order
- Create a Swap Fulfillment
- Cancel a Claim
- Process a Swap Payment
- Ship a Fulfillment
- Capture an Order's Payments
- Archive Order
- Update a Claim
- Request a Return
- Create a Claim Fulfillment
- Ship a Swap's Fulfillment
- Cancel a Fulfilmment
- Create a Claim
- Cancel an Order
- Order Edits
- Payments
- Payment Collections
- Product Collections
- Product Tags
- Product Types
- Product Variants
- Price Lists
- Products
- Product Categories
- Publishable Api Keys
- Reservations
- Regions
- Return Reasons
- Returns
- Sales Channels
- Shipping Options
- Shipping Profiles
- Stock Locations
- Store
- Swaps
- Uploads
- Tax Rates
- Users
- 【Demo】Products
Create a Batch Job
POST
/admin/batch-jobs
Admin API/Batch JobsBatch Jobs
dry_run
is set to true
, the batch job will not be executed until the it is confirmed, which can be done using the Confirm Batch Job endpoint.Request
Body Params application/json
type
string
required
batchType
property of the associated batch job strategy.Example:
product-export
dry_run
boolean
optional
Default:
false
context
object
required
Example:
{"list_config":{"skip":0,"take":50,"order":{"created_at":"DESC"},"relations":["variants","variant.prices","images"]},"shape":{"dynamicImageColumnCount":4,"dynamicOptionColumnCount":2,"prices":[{"region":null,"currency_code":"eur"}]}}
Example
{
"type": "product-export",
"dry_run": false,
"context": {
"list_config": {
"skip": 0,
"take": 50,
"order": {
"created_at": "DESC"
},
"relations": [
"variants",
"variant.prices",
"images"
]
},
"shape": {
"dynamicImageColumnCount": 4,
"dynamicOptionColumnCount": 2,
"prices": [
{
"region": null,
"currency_code": "eur"
}
]
}
}
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/admin/batch-jobs' \
--header 'Content-Type: application/json' \
--data-raw ''
Responses
🟢201OK
application/json
Body
batch_job
object (Batch Job)
required
id
string
required
Example:
batch_01G8T782965PYFG0751G0Z38B4
created_by
string | null
required
Example:
usr_01G1G5V26F5TB3GPAPNJ8X1S3V
dry_run
boolean
required
Default:
false
pre_processed_at
string <date-time> | null
required
processing_at
string <date-time> | null
required
confirmed_at
string <date-time> | null
required
completed_at
string <date-time> | null
required
canceled_at
string <date-time> | null
required
failed_at
string <date-time> | null
required
created_at
string <date-time>
required
updated_at
string <date-time>
required
deleted_at
string <date-time> | null
required
type
enum<string>
required
Allowed values:
product-importproduct-export
status
enum<string>
required
Allowed values:
createdpre_processedconfirmedprocessingcompletedcanceledfailed
Default:
created
context
object | null
required
Example:
{"list_config":{"skip":0,"take":50,"order":{"created_at":"DESC"},"relations":["variants","variant.prices","images"]},"shape":{"dynamicImageColumnCount":4,"dynamicOptionColumnCount":2,"prices":[{"region":null,"currency_code":"eur"}]}}
result
object
required
Examples:
{"stat_descriptors":[{"key":"product-export-count","name":"Product count to export","message":"There will be 8 products exported by this action"}],"errors":[{"code":"unknown","message":"Method not implemented.","err":[]}]}{}
created_by_user
object (User)
optional
Example
{
"batch_job": {
"id": "batch_01G8T782965PYFG0751G0Z38B4",
"created_by": "usr_01G1G5V26F5TB3GPAPNJ8X1S3V",
"dry_run": false,
"pre_processed_at": "2019-08-24T14:15:22Z",
"processing_at": "2019-08-24T14:15:22Z",
"confirmed_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"canceled_at": "2019-08-24T14:15:22Z",
"failed_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z",
"type": "product-import",
"status": "created",
"context": {
"list_config": {
"skip": 0,
"take": 50,
"order": {
"created_at": "DESC"
},
"relations": [
"variants",
"variant.prices",
"images"
]
},
"shape": {
"dynamicImageColumnCount": 4,
"dynamicOptionColumnCount": 2,
"prices": [
{
"region": null,
"currency_code": "eur"
}
]
}
},
"result": {
"stat_descriptors": {
"0": {
"key": "product-export-count",
"name": "Product count to export",
"message": "There will be 8 products exported by this action"
},
"key": "string",
"name": "string",
"message": "string"
},
"errors": {
"0": {
"code": "unknown",
"message": "Method not implemented.",
"err": []
},
"message": "string",
"err": [
"string"
],
"code": "string"
},
"count": 0,
"advancement_count": 0,
"progress": 0,
"file_key": "string",
"file_size": 0
},
"created_by_user": {
"id": "usr_01G1G5V26F5TB3GPAPNJ8X1S3V",
"email": "user@example.com",
"first_name": "Levi",
"last_name": "Bogan",
"api_token": null,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z",
"role": "member",
"metadata": {
"car": "white"
}
}
}
}
🟠400Client Error or Multiple Errors
🟠401User is not authorized. Must log in first
🟠404Not Found Error
🟠409Invalid State Error
🟠422Invalid Request Error
🔴500Server Error
Modified at 2024-05-23 07:10:14