v2 > Services > CollectionsCreate


Create one or more collections in Origin.

  • URL

    /connect/v2/collections/create

    /connect/v2/async/collections/create

  • Method:

    POST

  • URL Params

    none

  • Request :

Field Type Required Description Domain of value
collections[] array of object At least one The list of collections to create Collection object(s)
collections[].locale string Yes An Origin supported locale 'de', 'es_MX', 'en', 'fr' or 'zh_CN'
collections[].externalId string Yes The collection unique ID in your system Any string
collections[].name string Yes The collection name Any string
collections[].description string No The collection description Any string
collections[].website string No The collection website A valid public facing URL
collections[].logoUrl object No The collection logo URL A logoUrl object
collections[].logoUrl.originalUrl string Only if collections[].logoUrl is present The logo URL A valid public facing URL
  • Sample Request (Required fields):
{
    "collections": [
        {
            "locale": "en",
            "externalId": "ABC-001",
            "name": "My Collection"
        }
    ]
}
  • Sample Request (All fields):
{
    "collections": [
        {
            "locale": "en",
            "externalId": "ABC-001",
            "name": "My Collection",
            "description": "a collection des on",
            "website": "www.mycollection.tld 
            "logoUrl": {
                "originalUrl": "https://public.facing.url/logo.jpg"
            }
        }
    ]
}
  • Response (sync mode) :
Field Type Presence Description Domain of value
status object Always The execution status A status object
status.state string Always The state of execution 'SUCCESS' or 'ERROR'
status.code string On error The general error code and message See Errors reference
status.messages[] array of string On error List of error causes A validation message or other causes
result object On success The execution result A result object
result.entityType string On success The type of entity this result is about 'COLLECTION'
result.correlations[] object On success The identity correlations for all processed collections An array of correlation objects
result.correlations[].externalId string On success The external ID of the collection provided in the request Any string
result.correlations[].originId string On success The origin ID assigned to the create collection A valid UUID
connectRequest object Always The exact request sent that produced this response A CollectionsCreate request
  • Sample Response (Success in sync mode):

    HTTP Code : 200

{
    "status":{
        "state":"SUCCESS"
    },
    "result":{
        "entityType":"COLLECTION",
        "correlations":[
            {
                "externalId":"ABC-001",
                "originId":"88dada05-5d38-4b60-91b9-f1bf9d6bf5dd"
            }
        ]
    },
    "connectRequest":{
        "collections": [
            {
                "locale": "en",
                "externalId": "ABC-001",
                "name": "My Collection"
            }
        ]
    }
}
  • Response (async mode):
Field Type Presence Description Domain of value
status object Always The execution status A status object
status[].state string Always The state of execution 'SUCCESS' or 'ERROR'
status[].code string On error The general error code and message See Errors reference
status[].messages[] array of string On error List of error causes A validation message or other causes
result object On success The execution result A result object
result.poolingCallback string On success The URL callback to pool using the ResultGet endpoint A URL
connectRequest object Always The exact request you sent that produced this response A CollectionsCreate request
  • Sample Response (Success in async mode):

    HTTP Code : 200

{
    "status":{
        "state":"SUCCESS"
    },
    "result":{
        "poolingCallback":"https://origin.build/equinox/connect/v2/result/collections_create/batch/1c8a06b6-45be-4e68-9e2d-5c1f075e6ca2"
    },
    "connectRequest":{
        "collections": [
            {
                "locale": "en",
                "externalId": "ABC-001",
                "name": "My Collection"
            }
        ]
    }
}
  • Sample Response (Error):

    HTTP Code : 400, 500

{
    "status": {
        "state": "ERROR",
        "code": "CE00001 - Connect request failed validation. Refer to provided messages for details.",
        "messages": [
            "collections[1] require one locale.",
            "collections[1] require one name.",
            "collections[1] require one logoUrl.originalUrl.",
        ]
    },
    "connectRequest": {
        "collections": [
            {
                "externalId": "matexternalid001",
                "logoUrl":{}
            }
        ]
    }
}

results matching ""

    No results matching ""