Docs
post https://api.affiliates.iugu.com/events

Cria novos eventos

Sem ações implementadas definidas

Request

Headers

workspace_id

Required

Type: string

Identificador do workspace

Ex: 4fHECmQtLdROI4fDLWMiLd

Body Required

Content Type: application/json

events
Array of objects

affiliate_id

Required

String

ID do afiliado responsável pelo evento

Ex: 7iCCaotmWlRFig39trAXkB

event

Required

String

Nome da ação ou transação realizada

Ex: Boleto

amount

Required

Number

Valor total da operação

Ex: 100.0

idempotency_key

Required

String

Chave de idepotência

Ex: 23231233

Example
1
2
3
4
5
6
7
8
9
10
{
  "events": [
    {
      "affiliate_id": "7iCCaotmWlRFig39trAXkB",
      "event": "Boleto",
      "amount": 100.0,
      "idempotency_key": 23231233
    }
  ]
}

Response

200

Criação bem-sucedida

created
Number

Número de eventos criados

Ex: 12

errors
Array of objects

event
Object

affiliate_id
String

ID do afiliado responsável pelo evento

Ex: 7iCCaotmWlRFig39trAXkB

event
String

Nome da ação ou transação realizada

Ex: Boleto

amount
Number

Valor total da operação

Ex: 100.0

position
Number

Posição do evento na lista enviada

Ex: 1

message
String

Mensagem de erro

Ex: Validation error: The property '#/idempotency_key' of type null did not match the following type: string

Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
  "created": 12,
  "errors": [
    {
      "event": {
        "affiliate_id": "7iCCaotmWlRFig39trAXkB",
        "event": "Boleto",
        "amount": 100.0
      },
      "position": 1,
      "message": "Validation error: The property '#/idempotency_key' of type null did not match the following type: string"
    }
  ]
}

422

Unprocessable Entity

created
Number

Número de eventos criados

Ex: 0

errors
Array of objects

event
Object

affiliate_id
String

ID do afiliado responsável pelo evento

Ex: 7iCCaotmWlRFig39trAXkB

event
String

Nome da ação ou transação realizada

Ex: Boleto

amount
Number

Valor total da operação

Ex: 100.0

position
Number

Posição do evento na lista enviada

Ex: 1

message
String

Mensagem de erro

Ex: Validation error: The property '#/idempotency_key' of type null did not match the following type: string

Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
  "created": 0,
  "errors": [
    {
      "event": {
        "affiliate_id": "7iCCaotmWlRFig39trAXkB",
        "event": "Boleto",
        "amount": 100.0
      },
      "position": 1,
      "message": "Validation error: The property '#/idempotency_key' of type null did not match the following type: string"
    }
  ]
}

500

Internal Server Error

errors
String

Mensagem de erro

Ex: Internal Server Error

Example
1
2
3
{
  "errors": "Internal Server Error"
}