{
  "info": {
    "name": "Assiny — API pública",
    "description": "Rotas da API pública da Assiny. Preencha apiKey e projectId na aba Variables da collection. Documentação: https://docs.assiny.com/api/introducao",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "item": [
    {
      "name": "Produtos",
      "item": [
        {
          "name": "Listar produtos e ofertas",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "ProjectId",
                "value": "{{projectId}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/product/list/product/checkout/{{projectId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "product",
                "list",
                "product",
                "checkout",
                "{{projectId}}"
              ]
            },
            "description": "Devolve {\"products\": [...]}. Use para descobrir os IDs de produtos e ofertas."
          }
        },
        {
          "name": "Criar produto",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "ProjectId",
                "value": "{{projectId}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/product",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "product"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"projectId\": \"{{projectId}}\",\n  \"name\": \"Curso de Fotografia\",\n  \"nameDisplayed\": \"Curso de Fotografia Completo\",\n  \"class\": \"DIGITAL\",\n  \"productCategoryId\": \"9e36e78f-f0e3-42e4-8551-e18e8cecc5cf\",\n  \"supportEmail\": \"suporte@suaempresa.com.br\",\n  \"productorName\": \"Sua Empresa\",\n  \"productType\": \"PRODUCT\",\n  \"guarantee\": 7\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Criar vários produtos",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "ProjectId",
                "value": "{{projectId}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/multiple-products",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "multiple-products"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "[\n  {\n    \"projectId\": \"{{projectId}}\",\n    \"name\": \"Curso de Fotografia\",\n    \"nameDisplayed\": \"Curso de Fotografia Completo\",\n    \"class\": \"DIGITAL\",\n    \"productCategoryId\": \"9e36e78f-f0e3-42e4-8551-e18e8cecc5cf\",\n    \"supportEmail\": \"suporte@suaempresa.com.br\",\n    \"productorName\": \"Sua Empresa\",\n    \"productType\": \"PRODUCT\",\n    \"guarantee\": 7\n  },\n  {\n    \"projectId\": \"{{projectId}}\",\n    \"name\": \"Curso de Fotografia\",\n    \"nameDisplayed\": \"Curso de Fotografia Completo\",\n    \"class\": \"DIGITAL\",\n    \"productCategoryId\": \"9e36e78f-f0e3-42e4-8551-e18e8cecc5cf\",\n    \"supportEmail\": \"suporte@suaempresa.com.br\",\n    \"productorName\": \"Sua Empresa\",\n    \"productType\": \"PRODUCT\",\n    \"guarantee\": 7\n  }\n]",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Editar produto",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "ProjectId",
                "value": "{{projectId}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/product/{{productId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "product",
                "{{productId}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Curso de Fotografia\",\n  \"nameDisplayed\": \"Curso de Fotografia Completo\",\n  \"class\": \"DIGITAL\",\n  \"productCategoryId\": \"9e36e78f-f0e3-42e4-8551-e18e8cecc5cf\",\n  \"supportEmail\": \"suporte@suaempresa.com.br\",\n  \"productorName\": \"Sua Empresa\",\n  \"productType\": \"PRODUCT\",\n  \"guarantee\": 7\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Mande o produto completo, não só os campos alterados."
          }
        }
      ]
    },
    {
      "name": "Ofertas",
      "item": [
        {
          "name": "Criar oferta",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "ProjectId",
                "value": "{{projectId}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/checkout",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "checkout"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"productId\": \"{{productId}}\",\n  \"name\": \"Assinatura mensal\",\n  \"checkoutType\": \"ENTRY\",\n  \"paymentType\": \"SUBSCRIPTION\",\n  \"recurrence\": \"MONTHLY\",\n  \"amount\": 4990,\n  \"installments\": 1,\n  \"checkoutPaymentType\": \"PIX, CREDIT\",\n  \"checkoutLayoutType\": \"COMPACT\",\n  \"subscriptionMaxCycles\": 0\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Criar várias ofertas",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "ProjectId",
                "value": "{{projectId}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/multiple-checkouts",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "multiple-checkouts"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "[\n  {\n    \"productId\": \"{{productId}}\",\n    \"name\": \"Assinatura mensal\",\n    \"checkoutType\": \"ENTRY\",\n    \"paymentType\": \"SUBSCRIPTION\",\n    \"recurrence\": \"MONTHLY\",\n    \"amount\": 4990,\n    \"installments\": 1,\n    \"checkoutPaymentType\": \"PIX, CREDIT\",\n    \"checkoutLayoutType\": \"COMPACT\",\n    \"subscriptionMaxCycles\": 0\n  },\n  {\n    \"productId\": \"{{productId}}\",\n    \"name\": \"Assinatura mensal\",\n    \"checkoutType\": \"ENTRY\",\n    \"paymentType\": \"SUBSCRIPTION\",\n    \"recurrence\": \"MONTHLY\",\n    \"amount\": 4990,\n    \"installments\": 1,\n    \"checkoutPaymentType\": \"PIX, CREDIT\",\n    \"checkoutLayoutType\": \"COMPACT\",\n    \"subscriptionMaxCycles\": 0\n  }\n]",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Editar oferta",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "ProjectId",
                "value": "{{projectId}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/checkout/{{offerId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "checkout",
                "{{offerId}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"productId\": \"{{productId}}\",\n  \"name\": \"Assinatura mensal\",\n  \"checkoutType\": \"ENTRY\",\n  \"paymentType\": \"SUBSCRIPTION\",\n  \"recurrence\": \"MONTHLY\",\n  \"amount\": 4990,\n  \"installments\": 1,\n  \"checkoutPaymentType\": \"PIX, CREDIT\",\n  \"checkoutLayoutType\": \"COMPACT\",\n  \"subscriptionMaxCycles\": 0\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Mande a oferta completa."
          }
        }
      ]
    },
    {
      "name": "Funis",
      "item": [
        {
          "name": "Criar funil",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "ProjectId",
                "value": "{{projectId}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/funnel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "funnel"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Funil principal\",\n  \"checkoutId\": \"{{offerId}}\",\n  \"isActive\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Criar vários funis",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "ProjectId",
                "value": "{{projectId}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/multiple-funnels",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "multiple-funnels"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "[\n  {\n    \"name\": \"Funil principal\",\n    \"checkoutId\": \"{{offerId}}\",\n    \"isActive\": true\n  },\n  {\n    \"name\": \"Funil principal\",\n    \"checkoutId\": \"{{offerId}}\",\n    \"isActive\": true\n  }\n]",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Vendas",
      "item": [
        {
          "name": "Listar vendas",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "ProjectId",
                "value": "{{projectId}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/financial/bff/project/transaction?projectId={{projectId}}&status=paid&startDate=2026-11-01T00:00:00-03:00&endDate=2026-11-01T23:59:59-03:00&limit=50&offset=0",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "financial",
                "bff",
                "project",
                "transaction"
              ],
              "query": [
                {
                  "key": "projectId",
                  "value": "{{projectId}}"
                },
                {
                  "key": "status",
                  "value": "paid"
                },
                {
                  "key": "startDate",
                  "value": "2026-11-01T00:00:00-03:00"
                },
                {
                  "key": "endDate",
                  "value": "2026-11-01T23:59:59-03:00"
                },
                {
                  "key": "limit",
                  "value": "50"
                },
                {
                  "key": "offset",
                  "value": "0"
                }
              ]
            },
            "description": "Datas com fuso. Data sem hora é recusada com 400."
          }
        },
        {
          "name": "Detalhe de uma venda",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "ProjectId",
                "value": "{{projectId}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/financial/bff/sale/details/{{transactionId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "financial",
                "bff",
                "sale",
                "details",
                "{{transactionId}}"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Assinaturas e parcelamentos",
      "item": [
        {
          "name": "Detalhe de uma assinatura",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "ProjectId",
                "value": "{{projectId}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/subscription-admin/subscription/details/{{subscriptionId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "subscription-admin",
                "subscription",
                "details",
                "{{subscriptionId}}"
              ]
            },
            "description": "Campos em snake_case."
          }
        },
        {
          "name": "Cancelar assinatura",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "ProjectId",
                "value": "{{projectId}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/subscription-admin/cancel/subscription/{{subscriptionId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "subscription-admin",
                "cancel",
                "subscription",
                "{{subscriptionId}}"
              ]
            },
            "description": "Sem corpo. Cancela a assinatura e as cobranças futuras."
          }
        },
        {
          "name": "Reativar cobranças da assinatura",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "ProjectId",
                "value": "{{projectId}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/subscription-admin/reactivate/charge/{{subscriptionId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "subscription-admin",
                "reactivate",
                "charge",
                "{{subscriptionId}}"
              ]
            },
            "description": "Sem corpo. Pode cobrar o comprador: confirme antes."
          }
        },
        {
          "name": "Reativar cobranças de um parcelamento",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "ProjectId",
                "value": "{{projectId}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/smart-installment-admin/reactivate/charge/{{installmentId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "smart-installment-admin",
                "reactivate",
                "charge",
                "{{installmentId}}"
              ]
            },
            "description": "Sem corpo. Pode cobrar o comprador: confirme antes."
          }
        }
      ]
    },
    {
      "name": "Pedidos de reembolso",
      "item": [
        {
          "name": "Responder a um pedido de reembolso",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "ProjectId",
                "value": "{{projectId}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/request-refund/send-request",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "request-refund",
                "send-request"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"transaction_id\": \"{{transactionId}}\",\n  \"is_refund\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Responde a um pedido que o comprador já abriu. true aprova, false recusa."
          }
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://bff.assiny.com.br/v1/public"
    },
    {
      "key": "apiKey",
      "value": ""
    },
    {
      "key": "projectId",
      "value": ""
    },
    {
      "key": "productId",
      "value": ""
    },
    {
      "key": "offerId",
      "value": ""
    },
    {
      "key": "transactionId",
      "value": ""
    },
    {
      "key": "subscriptionId",
      "value": ""
    },
    {
      "key": "installmentId",
      "value": ""
    }
  ]
}