Criar Fatura
POST
http://{{app_url}}/api/v1/invoices/createRequest
Parâmetros Header
client-id
string
requerido
Exemplo:
{{client-id}}
client-secret
string
requerido
Exemplo:
{{client-secret}}
Parâmetros Bodyapplication/json
ref
string
requerido
due_date
string
requerido
description
string
requerido
discount_amount
integer
requerido
tax_amount
integer
requerido
customer
object
requerido
name
string
requerido
email
string
requerido
cellphone
string
requerido
cpfcnpj
string
requerido
address
object
requerido
items
array [object {4}]
requerido
name
string
requerido
description
string
requerido
quantity
integer
requerido
price
string
requerido
payable_with
object
requerido
boleto
boolean
requerido
pix
boolean
requerido
credit_card
boolean
requerido
pixboleto
boolean
requerido
credit_card_installments_without_interest
integer
requerido
notification_url
string
requerido
Exemplo
{
"ref": "50522220505",
"due_date": "25-07-2024",
"description": "Descrição da Fatura",
"discount_amount": 0,
"tax_amount": 0,
"customer": {
"name": "João da Silva",
"email": "joao@testeste.com.br",
"cellphone": "11999999999",
"cpfcnpj": "07120188917",
"address": {
"street": "Rua de Teste",
"number": "123",
"complement": "Sala 1",
"neighborhood": "Bairro Teste",
"city": "São Paulo",
"state": "SP",
"zipcode": "01234000"
}
},
"items": [
{
"name": "Produto 1",
"description": "Meu produto",
"quantity": 5,
"price": "100.25"
},
{
"name": "Produto 2",
"description": "Meu produto 2",
"quantity": 2,
"price": "11.44"
}
],
"payable_with": {
"boleto": false,
"pix": true,
"credit_card": false,
"pixboleto": false,
"credit_card_installments_without_interest": 0
},
"notification_url": "https://api.autoconta.com.br/backoffice/test-notification"
}
Request samples
Respostas
Criar Fatura(200)
HTTP Code: 200
Content Type : JSONapplication/json
Esquema de Dados
id
string
requerido
ref
string
requerido
description
string
requerido
status
string
requerido
subtotal_amount
string
requerido
total_amount
string
requerido
tax_amount
string
requerido
discount_amount
string
requerido
link_token
string
requerido
link
string
requerido
customer
object
requerido
id
string
requerido
name
string
requerido
email
string
requerido
description
null
requerido
cellphone
string
requerido
cpfcnpj
string
requerido
address
object
requerido
items
array [object {3}]
requerido
id
string
requerido
product
object
requerido
quantity
integer
requerido
payment
null
requerido
payable_with
object
requerido
boleto
boolean
requerido
pix
boolean
requerido
credit_card
boolean
requerido
shipping
null
requerido
due_date
string
requerido
paid_at
null
requerido
notification_url
null
requerido
created_at
string
requerido
notifications
array
requerido
ExemploCriar Fatura
{
"id": "83a0843b-0a98-402e-bb5f-75fcc44e11b1",
"ref": "150",
"description": "Descrição da Fatura",
"status": "unpaid",
"subtotal_amount": "5924.13",
"total_amount": "5924.13",
"tax_amount": "0",
"discount_amount": "0",
"link_token": "BdvkH6j2icCfSpj1E0Zxp9pnwuSrPm",
"link": "http://localhost:5180/hapo-code/public/fatura/BdvkH6j2icCfSpj1E0Zxp9pnwuSrPm",
"customer": {
"id": "e00e6af0-7775-4a0e-8f36-6f5f4af2bf16",
"name": "João da Silva",
"email": "joao@testeste.com.br",
"description": null,
"cellphone": "11999999999",
"cpfcnpj": "07120188917",
"address": {
"street": "Rua de Teste",
"number": "123",
"complement": "Sala 1",
"neighborhood": "Bairro Teste",
"city": "São Paulo",
"state": "SP",
"zipcode": "01234000"
}
},
"items": [
{
"id": "a274156f-7aa7-4be2-a735-e5bb428c9124",
"product": {
"id": "b7567ebc-924b-4604-948f-00afd4b697ef",
"name": "Produto 1",
"description": "Meu produto",
"price": "900.25"
},
"quantity": 5
},
{
"id": "4feb80eb-f07c-4e78-9822-97a5b5b6da9a",
"product": {
"id": "86cf4814-62d0-4704-9e19-74319f5c2282",
"name": "Produto 2",
"description": "Meu produto 2",
"price": "711.44"
},
"quantity": 2
}
],
"payment": null,
"payable_with": {
"boleto": true,
"pix": true,
"credit_card": true
},
"shipping": null,
"due_date": "25/04/2023",
"paid_at": null,
"notification_url": null,
"created_at": "05/04/2023",
"notifications": []
}
Last modified: a month ago