v2 > Services > BrandsUpdate


Update one or more brands in Origin.

  • URL

    /connect/v2/brands/update

    /connect/v2/async/brands/update

  • Method:

    POST

  • URL Params

    none

  • Request :

Field Type Required Description Domain of value
brands[] array of object At least one The list of brands to update Brand object(s)
brands[].locale string Yes An Origin supported locale 'de', 'es_MX', 'en', 'fr' or 'zh_CN'
brands[].originId string Only if no brands[].externalId The brand unique origin ID Any string
brands[].externalId string Only if no brands[].originId The brand unique ID in your system Any string
brands[].name string No The brand name Any string
brands[].description string No The brand description Any string
brands[].website string No The brand website A valid public facing URL
brands[].logoUrl object No The brand logo URL A logoUrl object
brands[].logoUrl.originalUrl string Only if brands[].logoUrl is present The logo URL A valid public facing URL
  • Sample Request (Update of brands attributes):
{
    "brands": [
        {
            "locale": "en",
            "originId": "88dada05-5d38-4b60-91b9-f1bf9d6bf5dd",
            "name": "My new brand name",
            "description": "a new brand description",
            "website": "https://public.facing.url/mynewbrand.html"
        }
    ]
}
  • Sample Request (Update of logoUrl):
{
    "brands": [
        {
            "locale": "en",
            "originId": "88dada05-5d38-4b60-91b9-f1bf9d6bf5dd",
            "logoUrl": {
                "originalUrl": "https://public.facing.url/newlogo.jpg"
            }
        }
    ]
}
  • Sample Request (All fields):
{
    "brands": [
        {
            "locale": "en",
            "originId": "88dada05-5d38-4b60-91b9-f1bf9d6bf5dd",
            "name": "My new brand name",
            "description": "a new brand description",
            "website": "https://public.facing.url/mynewbrand.html",
            "logoUrl": {
                "originalUrl": "https://public.facing.url/newlogo.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 'BRAND'
result.result object On success A simple completion message 'Update completed.'
connectRequest object Always The exact request sent that produced this response A BrandsUpdate request
  • Sample Response (Success in sync mode):

    HTTP Code : 200

{
    "status":{
        "state":"SUCCESS"
    },
    "result":{
        "entityType":"BRAND",
        "result":"Update completed."
    },
    "connectRequest":{
        "brands":[
            {
                "locale":"en",
                "originId":"88dada05-5d38-4b60-91b9-f1bf9d6bf5dd",
                "website":"https://public.facing.url/brand"
            }
        ]
    }
}
  • 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 BrandsUpdate request
  • Sample Response (Success in async mode):

    HTTP Code : 200

{
    "status":{
        "state":"SUCCESS"
    },
    "result":{
        "poolingCallback":"https://origin.build/equinox/connect/v2/result/brands_update/batch/1c8a06b6-45be-4e68-9e2d-5c1f075e6ca2"
    },
    "connectRequest":{
        "brands": [
            {
                "locale": "en",
                "originId":"88dada05-5d38-4b60-91b9-f1bf9d6bf5dd",
                "website":"https://public.facing.url/brand"
            }
        ]
    }
}
  • Sample Response (Error):

    HTTP Code : 400, 500

{
    "status": {
        "state": "ERROR",
        "code": "CE00001 - Connect request failed validation. Refer to provided messages for details.",
        "messages": [
            "brands[1] has invalid value 'eee' for field locale. Allowed value(s) : [de, es_MX, en, fr, zh_CN]",
            "brands[1] has invalid value 'Empty string' for field name. Allowed value(s) : [Non-empty string]",
            "brands[1] require one originId or externalId.",
            "brands[1] require one logoUrl.originalUrl."
        ]
    },
    "connectRequest": {
        "brands": [
            {
                "locale": "eee",
                "name": "",
                "description": "a new brand description",
                "logoUrl": {
                },
            }
        ]
    }
}

results matching ""

    No results matching ""