WoowUp Developer Docs
Woowup
  • Getting Started (EN)
  • Primeros Pasos (ES)
  • API
    • Users
    • Purchases
    • Products
    • Benefits
    • Coupons
    • Events
      • Garantía Extendida
    • Custom Attributes
    • Branches
    • Blacklist
    • Abandoned carts
    • Reset account
    • Integration Stats
    • Categories
    • Segment Export
  • Web Tracking
    • Configuración Navegación Web
  • Push Notifications
    • Configuración Notificaciones Web Push en Magento / Web Custom
    • Configuración Push en VTEX Legacy
    • Configuración Push en VTEX IO
    • ¿Cómo saber si la configuración fue exitosa?
  • Formularios Web
    • Formulario HTML / Script JS Newsletter
  • VTEX
    • Conectar Cuenta
    • Trigger Carrito Abandonado
    • Trigger Newsletter
    • VTEX APP Instalación
    • VTEX APP Configuración
  • Magento 1
    • Conectar Cuenta
    • Extension Carrito Abandonado
  • Magento 2
    • Conectar Cuenta
  • Shopify
    • Conectar Cuenta
  • Woocommerce
    • Conectar Cuenta
    • Extensión Carrito Abandonado
  • Prestashop
    • Conectar Cuenta
  • E3
    • Conecta tu eCommerce E3
  • Tienda Nube
    • Conectar Cuenta
  • Mensajería
    • SendGrid: Conectar Cuenta
    • Perfit: Conectar Cuenta
    • Infobip: Conectar Cuenta
  • Editor de campañas
    • Motor de template de emails
  • Data Processing
    • WoowUp Connectors
    • Migración a Multi - ID
  • How To
    • SurveyKiwi: Conectar Cuenta
      • Untitled
    • Snappy: Conectar Cuenta
    • Zendesk: Conectar Cuenta
  • Integración CSV / SQL
    • Primeros pasos
    • Archivo de Tiendas
    • Archivo de Categorías
    • Archivo de Productos
    • Archivo de Clientes
    • Archivo de Ventas
    • Archivo de Medios de Pago
    • Archivo de Miembros de Familia
  • Validación de Datos
  • ¿Cómo completar el Blueprint?
Powered by GitBook
On this page
  • Custom attributes - Users
  • GET /account/custom-attributes
  • POST /account/custom-attributes
  • PUT /account/custom-attributes/{name}
  • DELETE /account/custom-attributes/{name}
  • Custom attributes - Products
  • GET /account/product-custom-attributes
  • POST /account/product-custom-attributes
  • PUT /account/product-custom-attributes/{name}
  • DELETE /account/product-custom-attributes/{name}
  • Custom attributes - Purchases
  • GET /account/purchase-custom-attributes
  • POST /account/purchase-custom-attributes
  • PUT /account/purchase-custom-attributes/{name}
  • DELETE /account/purchase-custom-attributes/{name}
  • Custom attributes - Purchases Detail
  • GET /account/purchase-item-custom-attributes
  • POST /account/purchase-item-custom-attributes
  • PUT /account/purchase-item-custom-attributes/{name}
  • DELETE /account/purchase-item-custom-attributes/{name}

Was this helpful?

  1. API

Custom Attributes

Custom attributes - Users

GET /account/custom-attributes

List custom attribute's definitions

Parameter

Type

Required

Description

text

query

No

Search by attribute's name or attribute's label

limit

query

No

Items per page returned. Default 25, max 100

page

query

No

Number of page. First page is 0

Example

curl -X GET \
  -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Accept: application/json" \
  -H 'cache-control: no-cache' \
  'https://api.woowup.com/apiv3/account/custom-attributes'

Response

{
    "payload": [
        {
            "label": "Fecha de vigencia",
            "name": "vigencia",
            "field_type": "datetime",
            "data_type": "timestamp",
            "group": null
        },
        {
            "label": "Nro Socio",
            "name": "nro_socio",
            "field_type": "text",
            "data_type": "string",
            "group": "Datos del socio"
        },
        {
            "label": "Tipo de Documento",
            "name": "tipo_documento",
            "field_type": "select",
            "data_type": "string",
            "group": "Datos del socio"
            "options": [
                {
                    "value": "CI",
                    "text": "CI"
                },
                {
                    "value": "DNI",
                    "text": "DNI"
                },
                {
                    "value": "LC",
                    "text": "LC"
                },
                {
                    "value": "PASS",
                    "text": "PASS"
                },
                {
                    "value": "LE",
                    "text": "LE"
                },
                {
                    "value": "S/D",
                    "text": "S/D"
                }
            ]
        },
        {
            "label": "Sede",
            "name": "sede",
            "field_type": "select",
            "data_type": "string",
            "group": null,
            "options": [
                {
                    "value": "Palermo",
                    "text": "Palermo"
                },
                {
                    "value": "Belgrano",
                    "text": "Belgrano"
                }
            ]
        }
    ],
    "message": "ok",
    "code": "ok",
    "time": "22ms"

POST /account/custom-attributes

Create custom attribute's definition. The name property is the key of the attribute that you can use on the /users endpoint to send custom attributes data.

Request content format

{
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "Definition of custom attributes",
        "type": "object",
        "required": ["name", "data_type", "field_type", "label"],
        "properties": {
            "label": { "type": "string", "minLength": 1 },
            "name": { "type": "string", "minLength": 1 },
            "field_type": { 
                "type": "string", 
                "enum": ["text", "select", "datetime"]
            },
            "data_type": {
                "type": "string",
                "enum": ["string", "integer", "float", "timestamp"]
            },
            "options": {
                "type": "array",
                "items": {
                    "type": "object",
                    "required": ["value", "text"],
                    "properties": {
                        "value": { "type": "string" },
                        "text": { "type": "string" }
                    }
                }
            }
        }
    }

Example

These example creates a custom attribute definition to save the document type of the user

curl -X POST \
    -H "Accept: application/json" \
    -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    -H "Content-Type: application/json" \
    -H "Cache-Control: no-cache" \
    -d '{"label":"Tipo de Documento","field_type":"select","group":null,"data_type":"string","options":[{"value":"CI","text":"CI"},{"value":"DNI","text":"DNI"},{"value":"LC","text":"LC"},{"value":"PASS","text":"PASS"},{"value":"LE","text":"LE"},{"value":"S/D","text":"S/D"}]}' \
    'https://api.woowup.com/apiv3/account/custom-attributes'

Response

{
  "payload": {
    "label": "Tipo de Documento",
    "name": "tipo_documento",
    "field_type": "select",
    "data_type": "string",
    "group": null,
    "options": [
      {
        "value": "CI",
        "text": "CI"
      },
      {
        "value": "DNI",
        "text": "DNI"
      },
      {
        "value": "LC",
        "text": "LC"
      },
      {
        "value": "PASS",
        "text": "PASS"
      },
      {
        "value": "LE",
        "text": "LE"
      },
      {
        "value": "S\/D",
        "text": "S\/D"
      }
    ]
  },
  "message": "ok",
  "code": "ok",
  "time": "592ms"
}

PUT /account/custom-attributes/{name}

Update custom attribute's definition. Please be carefull whith data type's changes, you may loose information

Parameter

Type

Required

Description

name

URI

YES

Custom attribute's name (key)

Request content format

{
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "Definition of custom attributes",
        "type": "object",
        "properties": {
            "label": { "type": "string", "minLength": 1 },
            "field_type": { 
                "type": "string", 
                "enum": ["text", "select", "datetime"]
            },
            "data_type": {
                "type": "string",
                "enum": ["string", "integer", "float", "timestamp"]
            },
            "options": {
                "type": "array",
                "items": {
                    "type": "object",
                    "required": ["value", "text"],
                    "properties": {
                        "value": { "type": "string" },
                        "text": { "type": "string" }
                    }
                }
            }
        }
    }

Example

These example updates a custom attribute definition to save the document type of the user

curl -X PUT \
    -H "Accept: application/json" \
    -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    -H "Content-Type: application/json" \
    -H "Cache-Control: no-cache" \
    -d '{"label":"Tipo de Documento","field_type":"select","group":"Datos del cliente","data_type":"string","options":[{"value":"CI","text":"CI"},{"value":"DNI","text":"DNI"},{"value":"LC","text":"LC"},{"value":"PASS","text":"PASS"},{"value":"LE","text":"LE"},{"value":"S/D","text":"S/D"}]}' \
    'https://api.woowup.com/apiv3/account/custom-attributes/tipo_documento'

Response

{
  "payload": {
    "label": "Tipo de Documento",
    "name": "tipo_documento",
    "field_type": "select",
    "data_type": "string",
    "group": "Datos del cliente",
    "options": [
      {
        "value": "CI",
        "text": "CI"
      },
      {
        "value": "DNI",
        "text": "DNI"
      },
      {
        "value": "LC",
        "text": "LC"
      },
      {
        "value": "PASS",
        "text": "PASS"
      },
      {
        "value": "LE",
        "text": "LE"
      },
      {
        "value": "S\/D",
        "text": "S\/D"
      }
    ]
  },
  "message": "ok",
  "code": "ok",
  "time": "592ms"
}

DELETE /account/custom-attributes/{name}

Delete custom attribute's definition

Parameter

Type

Required

Description

name

URI

YES

Custom attribute's name (key)

Example

curl -X DELETE \
    -H "Accept: application/json" \
    -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    -H "Content-Type: application/json" \
    -H "Cache-Control: no-cache" \
    'https://api.woowup.com/apiv3/account/custom-attributes/tipo_documento'

Response

{
    "payload": [
        {
            "label": "Fecha de vigencia",
            "name": "vigencia",
            "field_type": "datetime",
            "data_type": "timestamp",
            "group": null
        },
        {
            "label": "Nro Socio",
            "name": "nro_socio",
            "field_type": "text",
            "data_type": "string",
            "group": "Datos del socio"
        },
        {
            "label": "Sede",
            "name": "sede",
            "field_type": "select",
            "data_type": "string",
            "group": null,
            "options": [
                {
                    "value": "Palermo",
                    "text": "Palermo"
                },
                {
                    "value": "Belgrano",
                    "text": "Belgrano"
                }
            ]
        }
    ],
    "message": "ok",
    "code": "ok",
    "time": "32ms"

Custom attributes - Products

GET /account/product-custom-attributes

List custom attribute's definitions

Parameter

Type

Required

Description

text

query

No

Search by attribute's name or attribute's label

limit

query

No

Items per page returned. Default 25, max 100

page

query

No

Number of page. First page is 0

Example

curl -X GET \
  -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Accept: application/json" \
  -H 'cache-control: no-cache' \
  'https://api.woowup.com/apiv3/account/product-custom-attributes'

Response

{
    "payload": [
        {
            "label": "Color",
            "name": "color",
            "field_type": "text",
            "data_type": "string",
            "group": null
        },
        {
            "label": "Peso",
            "name": "peso",
            "field_type": "text",
            "data_type": "integer",
            "group": null
        },
        {
            "label": "Alto",
            "name": "alto",
            "field_type": "text",
            "data_type": "string",
            "group": null
        },
        {
            "label": "Fecha lanzamiento",
            "name": "release_date",
            "field_type": "text",
            "data_type": "timestamp",
            "group": null
        }
    ],
    "message": "ok",
    "code": "ok",
    "time": "31ms"
}

POST /account/product-custom-attributes

Create custom attribute's definition. The name property is the key of the attribute.

Request content format

{
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "Definition of custom attributes",
        "type": "object",
        "required": ["name", "data_type", "field_type", "label"],
        "properties": {
            "label": { "type": "string", "minLength": 1 },
            "name": { "type": "string", "minLength": 1 },
            "field_type": { 
                "type": "string", 
                "enum": ["text", "select", "datetime"]
            },
            "data_type": {
                "type": "string",
                "enum": ["string", "integer", "float", "timestamp"]
            },
            "options": {
                "type": "array",
                "items": {
                    "type": "object",
                    "required": ["value", "text"],
                    "properties": {
                        "value": { "type": "string" },
                        "text": { "type": "string" }
                    }
                }
            }
        }
    }

Example

These example creates a custom attribute definition to save the "network" of the product

curl -X POST \
    -H "Accept: application/json" \
    -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    -H "Content-Type: application/json" \
    -H "Cache-Control: no-cache" \
    -d '{"label":"Network","name":"network","field_type":"checkbox","data_type": "string","group": "Technology","options":[{"value":"GMS","text":"GMS"},{"value":"HSPA","text":"HSPA"},{"value":"LTE","text":"LTE"}]}' \
    'https://api.woowup.com/apiv3/account/product-custom-attributes'

Response

{
    "payload": {
        "label": "Network",
        "name": "network",
        "field_type": "checkbox",
        "data_type": "string",
        "group": "Technology",
        "options": [
            {
                "value": "GMS",
                "text": "GMS"
            },
            {
                "value": "HSPA",
                "text": "HSPA"
            },
            {
                "value": "LTE",
                "text": "LTE"
            }
        ]
    },
    "message": "ok",
    "code": "ok",
    "time": "54ms"
}

PUT /account/product-custom-attributes/{name}

Update custom attribute's definition. Please be carefull whith data type's changes, you may loose information

Parameter

Type

Required

Description

name

URI

YES

Custom attribute's name (key)

Request content format

{
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "Definition of custom attributes",
        "type": "object",
        "properties": {
            "label": { "type": "string", "minLength": 1 },
            "field_type": { 
                "type": "string", 
                "enum": ["text", "select", "datetime"]
            },
            "data_type": {
                "type": "string",
                "enum": ["string", "integer", "float", "timestamp"]
            },
            "options": {
                "type": "array",
                "items": {
                    "type": "object",
                    "required": ["value", "text"],
                    "properties": {
                        "value": { "type": "string" },
                        "text": { "type": "string" }
                    }
                }
            }
        }
    }

Example

These example updates a custom attribute definition to save the "network" of the product

curl -X PUT \
    -H "Accept: application/json" \
    -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    -H "Content-Type: application/json" \
    -H "Cache-Control: no-cache" \
    -d '{"label":"Network","name":"network","field_type":"checkbox","data_type": "string","group": "Technology","options":[{"value":"GMS","text":"GMS"},{"value":"HSPA","text":"HSPA"},{"value":"LTE","text":"LTE"},{"value":"S/D","text":"S/D"}]}' \
    'https://api.woowup.com/apiv3/account/product-custom-attributes/network'

Response

{
    "payload": {
        "label": "Network",
        "name": "network",
        "field_type": "checkbox",
        "data_type": "string",
        "group": "Technology",
        "options": [
            {
                "value": "GMS",
                "text": "GMS"
            },
            {
                "value": "HSPA",
                "text": "HSPA"
            },
            {
                "value": "LTE",
                "text": "LTE"
            },
            {
                "value": "S/D",
                "text": "S/D"
            }
        ]
    },
    "message": "ok",
    "code": "ok",
    "time": "43ms"
}

DELETE /account/product-custom-attributes/{name}

Delete custom attribute's definition

Parameter

Type

Required

Description

name

URI

YES

Custom attribute's name (key)

Example

curl -X DELETE \
    -H "Accept: application/json" \
    -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    -H "Content-Type: application/json" \
    -H "Cache-Control: no-cache" \
    'https://api.woowup.com/apiv3/account/product-custom-attributes/network'

Response

{
    "payload": [
        {
            "label": "Color",
            "name": "color",
            "field_type": "text",
            "data_type": "string",
            "group": null
        },
        {
            "label": "Peso",
            "name": "peso",
            "field_type": "text",
            "data_type": "integer",
            "group": null
        },
        {
            "label": "Alto",
            "name": "alto",
            "field_type": "text",
            "data_type": "string",
            "group": null
        },
        {
            "label": "Fecha lanzamiento",
            "name": "release_date",
            "field_type": "text",
            "data_type": "timestamp",
            "group": null
        }
    ],
    "message": "ok",
    "code": "ok",
    "time": "49ms"
}

Custom attributes - Purchases

GET /account/purchase-custom-attributes

List custom attribute's definitions

Parameter

Type

Required

Description

text

query

No

Search by attribute's name or attribute's label

limit

query

No

Items per page returned. Default 25, max 100

page

query

No

Number of page. First page is 0

Example

curl -X GET \
  -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Accept: application/json" \
  -H 'cache-control: no-cache' \
  'https://api.woowup.com/apiv3/account/purchase-custom-attributes'

Response

{
    "payload": [
        {
            "label": "codigo_promocion",
            "name": "codigo_promocion",
            "field_type": "text",
            "data_type": "string",
            "group": null
        },
        {
            "label": "fecha_max_cambio",
            "name": "fecha_max_cambio",
            "field_type": "text",
            "data_type": "timestamp",
            "group": null
        }
    ],
    "message": "ok",
    "code": "ok",
    "time": "67ms"
}

POST /account/purchase-custom-attributes

Create custom attribute's definition. The name property is the key of the attribute.

Request content format

{
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "Definition of custom attributes",
        "type": "object",
        "required": ["name", "data_type", "field_type", "label"],
        "properties": {
            "label": { "type": "string", "minLength": 1 },
            "name": { "type": "string", "minLength": 1 },
            "field_type": { 
                "type": "string", 
                "enum": ["text", "select", "datetime"]
            },
            "data_type": {
                "type": "string",
                "enum": ["string", "integer", "float", "timestamp"]
            },
            "options": {
                "type": "array",
                "items": {
                    "type": "object",
                    "required": ["value", "text"],
                    "properties": {
                        "value": { "type": "string" },
                        "text": { "type": "string" }
                    }
                }
            }
        }
    }

Example

These example creates a custom attribute definition to save the "nombre_promocion" of the purchase

curl -X POST \
    -H "Accept: application/json" \
    -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    -H "Content-Type: application/json" \
    -H "Cache-Control: no-cache" \
    -d '{"label":"Nombre promocion","name":"nombre_promocion","field_type":"text","data_type": "string","group": null}' \
    'https://api.woowup.com/apiv3/account/purchase-custom-attributes'

Response

{
    "payload": {
        "label": "Nombre promocion",
        "name": "nombre_promocion",
        "field_type": "text",
        "data_type": "string",
        "group": null
    },
    "message": "ok",
    "code": "ok",
    "time": "52ms"
}

PUT /account/purchase-custom-attributes/{name}

Update custom attribute's definition. Please be carefull whith data type's changes, you may loose information

Parameter

Type

Required

Description

name

URI

YES

Custom attribute's name (key)

Request content format

{
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "Definition of custom attributes",
        "type": "object",
        "properties": {
            "label": { "type": "string", "minLength": 1 },
            "field_type": { 
                "type": "string", 
                "enum": ["text", "select", "datetime"]
            },
            "data_type": {
                "type": "string",
                "enum": ["string", "integer", "float", "timestamp"]
            },
            "options": {
                "type": "array",
                "items": {
                    "type": "object",
                    "required": ["value", "text"],
                    "properties": {
                        "value": { "type": "string" },
                        "text": { "type": "string" }
                    }
                }
            }
        }
    }

Example

These example updates a custom attribute definition to save the "codigo_promocion" of the purchase

curl -X PUT \
    -H "Accept: application/json" \
    -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    -H "Content-Type: application/json" \
    -H "Cache-Control: no-cache" \
    -d '{"label": "codigo_promocion","name": "codigo_promocion","field_type": "text","data_type": "integer","group": null}' \
    'https://api.woowup.com/apiv3/account/purchase-custom-attributes/codigo_promocion'

Response

{
    "payload": {
        "label": "codigo_promocion",
        "name": "codigo_promocion",
        "field_type": "text",
        "data_type": "integer",
        "group": null
    },
    "message": "ok",
    "code": "ok",
    "time": "57ms"
}

DELETE /account/purchase-custom-attributes/{name}

Delete custom attribute's definition

Parameter

Type

Required

Description

name

URI

YES

Custom attribute's name (key)

Example

curl -X DELETE \
    -H "Accept: application/json" \
    -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    -H "Content-Type: application/json" \
    -H "Cache-Control: no-cache" \
    'https://api.woowup.com/apiv3/account/purchase-custom-attributes/nombre_promocion'

Response

{
    "payload": [
        {
            "label": "codigo_promocion",
            "name": "codigo_promocion",
            "field_type": "text",
            "data_type": "integer",
            "group": null
        },
        {
            "label": "fecha_max_cambio",
            "name": "fecha_max_cambio",
            "field_type": "text",
            "data_type": "timestamp",
            "group": null
        }
    ],
    "message": "ok",
    "code": "ok",
    "time": "50ms"
}

Custom attributes - Purchases Detail

GET /account/purchase-item-custom-attributes

List custom attribute's definitions

Parameter

Type

Required

Description

text

query

No

Search by attribute's name or attribute's label

limit

query

No

Items per page returned. Default 25, max 100

page

query

No

Number of page. First page is 0

Example

curl -X GET \
  -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Accept: application/json" \
  -H 'cache-control: no-cache' \
  'https://api.woowup.com/apiv3/account/purchase-item-custom-attributes'

Response

{
    "payload": [
        {
            "label": "alto",
            "name": "alto",
            "field_type": "text",
            "data_type": "integer",
            "group": null
        },
        {
            "label": "ancho",
            "name": "ancho",
            "field_type": "text",
            "data_type": "integer",
            "group": null
        },
        {
            "label": "volumen",
            "name": "volumen",
            "field_type": "text",
            "data_type": "string",
            "group": null
        }
    ],
    "message": "ok",
    "code": "ok",
    "time": "37ms"
}

POST /account/purchase-item-custom-attributes

Create custom attribute's definition. The name property is the key of the attribute.

Request content format

{
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "Definition of custom attributes",
        "type": "object",
        "required": ["name", "data_type", "field_type", "label"],
        "properties": {
            "label": { "type": "string", "minLength": 1 },
            "name": { "type": "string", "minLength": 1 },
            "field_type": { 
                "type": "string", 
                "enum": ["text", "select", "datetime"]
            },
            "data_type": {
                "type": "string",
                "enum": ["string", "integer", "float", "timestamp"]
            },
            "options": {
                "type": "array",
                "items": {
                    "type": "object",
                    "required": ["value", "text"],
                    "properties": {
                        "value": { "type": "string" },
                        "text": { "type": "string" }
                    }
                }
            }
        }
    }

Example

These example creates a custom attribute definition to save the "garantia_fabricante" of the purchase detail

curl -X POST \
    -H "Accept: application/json" \
    -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    -H "Content-Type: application/json" \
    -H "Cache-Control: no-cache" \
    -d '{"label":"Garantia del Fabricante","name":"garantia_fabricante","field_type":"text","data_type": "string","group": null}' \
    'https://api.woowup.com/apiv3/account/purchase-item-custom-attributes'

Response

{
    "payload": {
        "label": "Garantia del Fabricante",
        "name": "garantia_fabricante",
        "field_type": "text",
        "data_type": "string",
        "group": null
    },
    "message": "ok",
    "code": "ok",
    "time": "52ms"
}

PUT /account/purchase-item-custom-attributes/{name}

Update custom attribute's definition. Please be carefull whith data type's changes, you may loose information

Parameter

Type

Required

Description

name

URI

YES

Custom attribute's name (key)

Request content format

{
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "Definition of custom attributes",
        "type": "object",
        "properties": {
            "label": { "type": "string", "minLength": 1 },
            "field_type": { 
                "type": "string", 
                "enum": ["text", "select", "datetime"]
            },
            "data_type": {
                "type": "string",
                "enum": ["string", "integer", "float", "timestamp"]
            },
            "options": {
                "type": "array",
                "items": {
                    "type": "object",
                    "required": ["value", "text"],
                    "properties": {
                        "value": { "type": "string" },
                        "text": { "type": "string" }
                    }
                }
            }
        }
    }

Example

These example updates a custom attribute definition to save the garantia_fabricante" of the purchase detail

curl -X PUT \
    -H "Accept: application/json" \
    -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    -H "Content-Type: application/json" \
    -H "Cache-Control: no-cache" \
    -d '{"label":"Garantia del Fabricante","name":"garantia_fabricante","field_type":"text","data_type": "timestamp","group": null}' \
    'https://api.woowup.com/apiv3/account/purchase-item-custom-attributes/garantia_fabricante'

Response

{
    "payload": {
        "label": "Garantia del Fabricante",
        "name": "garantia_fabricante",
        "field_type": "text",
        "data_type": "timestamp",
        "group": null
    },
    "message": "ok",
    "code": "ok",
    "time": "56ms"
}

DELETE /account/purchase-item-custom-attributes/{name}

Delete custom attribute's definition

Parameter

Type

Required

Description

name

URI

YES

Custom attribute's name (key)

Example

curl -X DELETE \
    -H "Accept: application/json" \
    -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    -H "Content-Type: application/json" \
    -H "Cache-Control: no-cache" \
    'https://api.woowup.com/apiv3/account/purchase-item-custom-attributes/garantia_fabricante'

Response

{
    "payload": [
        {
            "label": "alto",
            "name": "alto",
            "field_type": "text",
            "data_type": "integer",
            "group": null
        },
        {
            "label": "ancho",
            "name": "ancho",
            "field_type": "text",
            "data_type": "integer",
            "group": null
        },
        {
            "label": "volumen",
            "name": "volumen",
            "field_type": "text",
            "data_type": "string",
            "group": null
        }
    ],
    "message": "ok",
    "code": "ok",
    "time": "56ms"
}
PreviousGarantía ExtendidaNextBranches

Last updated 5 years ago

Was this helpful?