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
  • GET /branches
  • GET /branches/{id}
  • POST /branches
  • PUT /branches/{id}
  • Delete branch

Was this helpful?

  1. API

Branches

GET /branches

Retrieve a list of branches

Parameter

Type

Required

Description

page

query

No

Number of the page returned. Default: 0

limit

query

No

Items per page returned. Default: 10, Max: 100

Example

curl -X GET \
  'https://api.woowup.com/apiv3/branches?page=0&limit=1' \
  -H 'accept: application/json' \
  -H 'authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
  -H 'cache-control: no-cache'

Response

{
    "payload": [
        {
            "id": 1,
            "name": "Palermo I",
            "display_name": "Palermo",
            "description": "",
            "status": "active",
            "created": "2018-04-13 15:12:50",
            "modified": null,
            "holder": null,
            "email": null,
            "telephone": null,
            "address": null,
            "working_hours": null,
            "notes": null,
            "branch_zone_name": null
        }
    ],
    "message": "ok",
    "code": "ok",
    "time": "25ms"
}

HTTP Response codes

HTTP Code

Name

Description

200

ok

Successful request

400

bad request

Invalid parameters

403

forbidden

Invalid or inexistent apikey

405

method not allowed

Use an invalid http verb in the request

500

server error

Internal error, explained in the json response

GET /branches/{id}

Retrieve a specific branch identified by id.

Parameter

Type

Required

Description

id

uri

Yes

Branch ID

Example

curl -X GET \
  'https://api.woowup.com/apiv3/branches/1' \
  -H 'accept: application/json' \
  -H 'authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
  -H 'cache-control: no-cache'

Response

{
    "payload": {
        "id": 1,
        "name": "Palermo I",
        "display_name": "Palermo",
        "description": "",
        "status": "active",
        "created": "2018-04-13 15:12:50",
        "modified": null,
        "holder": null,
        "email": null,
        "telephone": null,
        "address": null,
        "working_hours": null,
        "notes": null,
        "branch_zone_name": null
    },
    "message": "ok",
    "code": "ok",
    "time": "25ms"
}

HTTP Response codes

HTTP Code

Name

Description

200

ok

Successful request

400

bad request

Invalid parameters

403

forbidden

Invalid or inexistent apikey

405

method not allowed

Use an invalid http verb in the request

500

server error

Internal error, explained in the json response

POST /branches

Create a new branch.

Request content format

{
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "A branch",
        "type": "object",
        "required": ["name"],
        "properties": {
            "name": { "type": "string", "minLenght": 1, "maxLength": 128 },
            "description": { "type": ["string", "null"], "minLenght": 1, "maxLength": 100 },
            "display_name": { "type": ["string", "null"], "minLenght": 1, "maxLength": 128 },
            "email": { "type": ["string", "null"] },
            "telephone": { "type": ["string", "null"] },
            "address": { "type": ["string", "null"] },
            "working_hours": { "type": ["string", "null"] },
            "notes": { "type": ["string", "null"] },
            "branch_zone": {
                "type": ["object", "null"],
                "properties": {
                    "code": { "type": "string" },
                    "name": { "type": "string" }
                }
            },
            "holder": { "type": ["string", "null"] },
            "status": { "type": ["string", "null"], "enum": ["active", "inactive"] },
            "country": {
                "type": ["object", "null"],
                "properties": {
                    "code": { "type": "string" }
                }
            },
            "state": { "type": ["string", "null"] },
            "city": { "type": ["string", "null"] },
            "business_type": { "type": ["string", "null"], "enum": ["own", "franchisee", null] },
            "shopping_center": { "type": ["string", "null"] },
            "location_type": { "type": ["string", "null"] },
            "m2": { "type": ["integer", "null"] },
            "m2_cost": { "type": ["integer", "null"] },
            "employees_quantity": { "type": ["integer", "null"] },
            "group": { "type": ["string", "null"] },
            "format": { "type": ["string", "null"], "enum": ["brand_branch", "multibrand_branch", "brand_island", "multibrand_island", "outlet", null] },
            "is_web": { "type": "boolean" }
        }
    }

Example

{
    "name" : 'Shopping de Prueba',
    "description" : "Este Shopping es una prueba para el endpoint de creación de sucursales",
    "working_hours" : "Lunes a Viernes 9.00 a 22.00 hs",
    "email" : "shopping@marca.com.ar",
    "telephone" : "01132392300",
    "holder" : "Gerente Juan Perez",
    "branch_zone_name" : "Buenos Aires",
    "country": ARG
}

Errors

HttpCode

HttpCode Name

Code

Description

201

ok

ok

Branch successfully saved

400

bad request

bad_request

Invalid parameters, view message for more details

400

bad request

already_exist

The branch already exist

500

internal error

internal_error

Unexpected error

PUT /branches/{id}

Update a branch.

Parameter

Type

Required

Description

id

URI

Yes

Branch Id in WoowUp

Request content format

{
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "A branch",
        "type": "object",
        "properties": {
            "name": { "type": "string", "minLenght": 1, "maxLength": 128 },
            "description": { "type": "string", "minLenght": 1, "maxLength": 100 },
            "display_name": { "type": ["string", "null"], "minLenght": 1, "maxLength": 128 },
            "email": { "type": "string" },
            "telephone": { "type": "string" },
            "address": { "type": "string" },
            "working_hours": { "type": "string" },
            "notes": { "type": "string" },
            "branch_zone_name": { "type": "string" },
            "holder": { "type": "string" },
            "status": { "type": "string", "enum": ["active", "inactive"] }
        }
    }

Example

{
    "description": "Este shopping es una prueba para el endpoint de actualización de sucursales",
    "working_hours": "Lunes a Viernes 11.00 a 22.00 hs",
    "branch_zone_name": "Pilar"
}

Errors

HttpCode

HttpCode Name

Code

Description

200

ok

ok

Branch successfully updated

400

bad request

bad_request

Invalid parameters, view message for more details

404

not found

not_found

The branch doesn't exist

500

internal error

internal_error

Unexpected error

Delete branch

DELETE https://api.woowup.com/apiv3/branches

Delete a branch and its purchases

Request Body

Name
Type
Description

id

integer

Branch Id in WoowUp

notify_to

string

email to receive the confirmation

{
    "payload": {
        "request_id": "xxxx"
    },
    "message": "ok",
    "code": "ok",
    "time": "62ms"
}
{
    "payload": {
        "errors": [
            "Required properties missing: [\"id\"]"
        ]
    },
    "message": "bad request",
    "code": "bad_request",
    "time": "240ms"
}
{
    "payload": [],
    "message": "forbidden: authentication failed",
    "code": "forbidden",
    "time": "7ms"
}
{
    "payload": {
        "errors": "The branch doesn't exist"
    },
    "message": "not found",
    "code": "not_found",
    "time": "891ms"
}
{
    "payload": [],
    "message": "",
    "code": "internal_error",
    "time": "72ms"
}

Example

curl -X DELETE \
  https://api.woowup.com/apiv3/branches \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic XXXXXXXXXXXXXXXXXXXX' \
  -H 'Content-Type: application/json' \
  -d '{
	"id": 00000,
	"notify_to": "test@email.com"
}'

Response

{
    "payload": {
        "request_id": "XXXX"
    },
    "message": "ok",
    "code": "ok",
    "time": "62ms"
}
PreviousCustom AttributesNextBlacklist

Last updated 5 years ago

Was this helpful?

The json with the branch should be valid with the following

This is a valid branch according to the previous :

The json with the branch should be valid with the following

This is a valid branch according to the previous , We are going to change branch description, working hours and it's zoneN

json-schema
json-schema
json-schema
json-schema