Docs Afiliados
...

Listar eventos

get https://api.affiliates.iugu.com/events

Retorna uma lista de eventos

Autorizações
oAuthClientCredentials
Flow type: clientCredentials
Token URL: https://identity.iugu.com/token
Scopes:
  • not:required - scopes are not in use

Respostas

200
OK
data
Array

id
String

Identificador único do evento

Ex: 8c4b2947-1298-43e6-a07d-00eb63f8e4f1

type
String

Tipo de recurso ("event")

Ex: event

attributes
Object

event
String

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

Ex: pix

affiliate_id
String

ID do afiliado responsável pelo evento

Ex: 489bdd40-a179-4a8a-9708-34e61d35bec0

amount
Number

Valor total da operação

Ex: 1333.0

status
String

Indica o estado atual da operação

Ex: done

payment_id
String

ID do pagamento do qual o evento constitui parte

created_at
String

Data de criação do registro

Ex: 2023-12-26T15:32:08.807Z

updated_at
String

Data de atualização do registro

Ex: 2023-12-26T15:32:08.807Z

relationships
Object

affiliate
Object

data
Object

id
String

Ex: 4054c1d4-2ed3-4176-bd99-b0fc5b5a7f58

type
String

Ex: affiliate

payment
Object

data
Object

id
String

Ex: 4054c1d4-2ed3-4176-bd99-b0fc5b5a7f58

type
String

Ex: payment

meta
Object

total
Integer

Total de eventos

Ex: 1

links
Object

self
String

URL da página atual

Ex: https://affiliates.iugu.com/api/events

current
String

URL da página atual

Ex: https://affiliates.iugu.com/api/events?page[number]=1

400
Bad Request
errors
Array

status
String

Ex: 400

source
Null

title
String

Ex: Bad Request

detail
Null

404
Not Found
errors
Array

status
String

Ex: 404

source
Null

title
String

Ex: Not Found

detail
Null

500
Internal Server Error
errors
Array

status
String

Ex: 500

source
Null

title
String

Ex: Internal Server Error

detail
Null

Criar evento

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

Cria um novo evento

Autorizações
oAuthClientCredentials
Flow type: clientCredentials
Token URL: https://identity.iugu.com/token
Scopes:
  • not:required - scopes are not in use

Schema Obrigatório

Tipo de conteúdo: application/json

event
Object

affiliate_id

Obrigatório

String

ID do afiliado responsável pelo evento

Ex: f265618a-761e-4ffb-8a70-e9e60752dd91

event

Obrigatório

String

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

Ex: Boleto

amount

Obrigatório

Number

Valor total da operação

Ex: 100.0

Exemplo
1
2
3
4
5
6
7
{
  "event": {
    "affiliate_id": "f265618a-761e-4ffb-8a70-e9e60752dd91",
    "event": "Boleto",
    "amount": 100.0
  }
}

Respostas

201
Criação bem-sucedida
data
Object

id
String

Identificador único do evento criado

Ex: 11b7fd9f-4d5d-44ce-bd5a-ba3746cb97ff

type
String

Tipo de recurso ("event")

Ex: event

attributes
Object

event
String

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

Ex: Venda

affiliate_id
String

ID do afiliado responsável pelo evento

Ex: f265618a-761e-4ffb-8a70-e9e60752dd91

amount
Number

Valor total da operação

Ex: 100.0

status
String

Estado atual do evento

Ex: pending

payment_id
String

ID do pagamento associado ao evento (pode ser nulo)

created_at
String

Data e hora de criação do evento

Ex: 2024-01-10T17:20:37.015Z

updated_at
String

Data e hora da última atualização do evento

Ex: 2024-01-10T17:20:37.015Z

relationships
Object

affiliate
Object

data
Object

id
String

Ex: 4054c1d4-2ed3-4176-bd99-b0fc5b5a7f58

type
String

Ex: affiliate

payment
Object

data
Object

id
String

Ex: 4054c1d4-2ed3-4176-bd99-b0fc5b5a7f58

type
String

Ex: payment

links
Object

self
String

URL da página atual

Ex: https://affiliates.iugu.com/api/events

422
Unprocessable Entity
errors
Array

status
String

Código do erro

Ex: 422

source
Object

pointer
String

Ex: /data/attributes/name

title
String

Título do erro

Ex: Unprocessable Entity

detail
String

Mensagem de erro

Ex: Nome não pode ficar em branco

code
String

Código do erro

Ex: blank

400
Bad Request
errors
Array

status
String

Ex: 400

source
Null

title
String

Ex: Bad Request

detail
Null

404
Not Found
errors
Array

status
String

Ex: 404

source
Null

title
String

Ex: Not Found

detail
Null

500
Internal Server Error
errors
Array

status
String

Ex: 500

source
Null

title
String

Ex: Internal Server Error

detail
Null