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
  • Coupons
  • Update Coupon

Was this helpful?

  1. API

Coupons

Coupons

GET https://api.woowup.com/apiv3/coupons

Retrieve a list of redeemed coupons by assign_date descending

Path Parameters

Name
Type
Description

status

string

"available", "assigned", "pending", "cancelled", "used"

from

string

Min assign_date of the returned coupons. Format yyyy-mm-dd hh:mm:ss (UTC

to

string

Max assign_date of the returned coupons. Format yyyy-mm-dd hh:mm:ss (UTC)

page

number

Number of the page returned. Default 0

limit

number

Items per page returned. Default 25, MAX 100

[
    {
        "id": 1234,
        "code": "ASE34AWVS21",
        "assign_date": "2017-05-10 14:32:12",
        "status": "assigned",
        "user": {
            "userapp_id": 1234,
            "user_id": 1234,
            "app_id": 123,
            "service_uid": "98765",
            "email": "user@email.com",
            "first_name": "John",
            "last_name": "Doe",
            "telephone": "5411987654321",
            "birthday": "1986-08-13",
            "gender": "M",
            "tags": [],
            "points": 0,
            "points_pending": 0,
            "customform": {
                "user_id": "98765"
            },
            "club_inscription_date": "2017-01-03",
            "blocked": false,
            "notes": "user notes",
            "mailing_enabled": true,
            "mailing_enabled_reason": null
        },
        "benefit": {
            "id": 1234,
            "slug": "benefit-1-title",
            "title": "Benefit 1 title",
            "description": "Benefit 1 description",
            "terms": "Terms and condition",
            "on_assign_msg": "After assign message",
            "status": 1,
            "app_id": 123,
            "startdate": "2017-04-20 14:51:00",
            "enddate": "2017-05-17 19:34:25",
            "action_id": 5678,
            "image_url": "https://api.woowup.com/image.png"
        }
    },
    {
        "id": 1235,
        "code": "ASE34AWVS22",
        "assign_date": null,
        "status": "available",
        "user": null,
        "benefit": {
            "id": 1234,
            "slug": "benefit-1-title",
            "title": "Benefit 1 title",
            "description": "Benefit 1 description",
            "terms": "Terms and condition",
            "on_assign_msg": "After assign message",
            "status": 1,
            "app_id": 123,
            "startdate": "2017-04-20 14:51:00",
            "enddate": "2017-05-17 19:34:25",
            "action_id": 5678,
            "image_url": "https://api.woowup.com/image.png"
        }
    }
]

Example

curl -X GET \
  'https://api.woowup.com/apiv3/coupons?status=assigned&limit=100&page=0&from=2017-01-01%2000%3A00%3A00&to=2017-05-31%2023%3A59%3A59' \
  -H 'accept: application/json' \
  -H 'authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
  -H 'cache-control: no-cache'

Update Coupon

PUT https://api.woowup.com/apiv3/coupons/:code

Request Body

Name
Type
Description

status

string

[
    {
        "id": 1234,
        "code": "abcdefg",
        "assign_date": "2017-05-10 14:32:12",
        "status": "cancelled",
        "user": {
            "userapp_id": 1234,
            "user_id": 1234,
            "app_id": 123,
            "service_uid": "98765",
            "email": "user@email.com",
            "first_name": "John",
            "last_name": "Doe",
            "telephone": "5411987654321",
            "birthday": "1986-08-13",
            "gender": "M",
            "tags": [],
            "points": 0,
            "points_pending": 0,
            "customform": {
                "user_id": "98765"
            },
            "club_inscription_date": "2017-01-03",
            "blocked": false,
            "notes": "user notes",
            "mailing_enabled": true,
            "mailing_enabled_reason": null
        },
        "benefit": {
            "id": 1234,
            "slug": "benefit-1-title",
            "title": "Benefit 1 title",
            "description": "Benefit 1 description",
            "terms": "Terms and condition",
            "on_assign_msg": "After assign message",
            "status": 1,
            "app_id": 123,
            "startdate": "2017-04-20 14:51:00",
            "enddate": "2017-05-17 19:34:25",
            "action_id": 5678,
            "image_url": "https://api.woowup.com/image.png"
        }
    }
]
{
    "payload": {
        "errors": [
            "/status: Value \"qwerty\" is not one of: [\"available\",\"assigned\",\"pending\",\"cancelled\",\"used\"]"
        ]
    },
    "message": "bad request",
    "code": "bad_request",
    "time": "42ms"
}
{
    "payload": [],
    "message": "Can't update coupon",
    "code": "internal_error",
    "time": "82ms"
}
curl -X PUT \
  https://api.woowup.com/apiv3/coupons/abcdefg \
  -H 'accept: application/json' \
  -H 'authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
  -d '{
	"status": "cancelled"
}'
PreviousBenefitsNextEvents

Last updated 5 years ago

Was this helpful?

{ "$schema": "", "description": "A representation of a coupon", "type": "object", "required": ["status"], "properties": { "status": { "type": "string", "enum": ["available", "assigned", "pending", "cancelled", "used"] } }

http://json-schema.org/draft-04/schema#