Create bulk items
This section describes how to create items in bulk using the Phosphor API. You can also create one item at a time.
Issue a POST
request to the items
endpoint to create bulk items.
POST https://admin-api.phosphor.xyz/v1/items/bulk
Example payload
{
"items": [
{
"collection_id": "960300ca-ad1e-4054-b056-77c3dcfd2b9d",
"attributes": {
"additionalProp1": "Unknown Type: object,array,number,string,boolean,null",
"additionalProp2": "Unknown Type: object,array,number,string,boolean,null",
"additionalProp3": "Unknown Type: object,array,number,string,boolean,null"
},
"item_type_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
{
"collection_id": "960300ca-ad1e-4054-b056-77c3dcfd2b9d",
"attributes": {
"additionalProp1": "Unknown Type: object,array,number,string,boolean,null",
"additionalProp2": "Unknown Type: object,array,number,string,boolean,null",
"additionalProp3": "Unknown Type: object,array,number,string,boolean,null"
},
"item_type_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
]
}
Parameter | Required? | Description |
---|---|---|
collection_id | Yes | ID of the collection that items will be created from. |
attributes | Yes | Varies by item-type . Usually contains title , description , image_url . title is a required field. |
item_type_id | No | ID of the item type commonly associated with this collection. |
Example response
{
"item_ids": [
"4459e59b-5af9-447c-ba6b-a1caabd989fc",
"c35be788-3afa-47a5-bb97-64905f8578d0"
]
}