Webhook

Webhook para receber eventos de mudanças no status de um Workflow ou WorkflowStep.

Listar Webhook

GET https://api-v1.assine.online/webhook-business-unit

Listar todos os webhooks cadastrados.

Headers

{
  "_links": {
    "self": {
      "href": "http://localhost/webhook-business-unit?page=1"
    },
    "first": {
      "href": "http://localhost/webhook-business-unit"
    },
    "last": {
      "href": "http://localhost/webhook-business-unit?page=1"
    }
  },
  "_embedded": {
    "webhook_business_unit": [
      {
        "id": 49,
        "url": "https://webhook.site/b2350d9a-5476-425b-bc98-7028fb8f1ee6 Menguin",
        "_embedded": {
          "user": {
            "id": 121,
            "username": "sinesio.leao@soluti.com.br",
            "status": "1",
            "name": "Sinésio Da silva",
            "email": "sinesio.leao@soluti.com.br",
            "position": "vendas",
            "cellphone": "5521967233131",
            "whatsappNumber": "5521967233131",
            "notifyWhatsapp": true,
            "document": null,
            "country": null,
            "state": null,
            "city": null,
            "address": null,
            "zipCode": null,
            "dateCreated": {
              "date": "2021-01-11 22:49:16.000000",
              "timezone_type": 3,
              "timezone": "UTC"
            },
            "dateLastUpdated": {
              "date": "2022-05-09 12:24:12.000000",
              "timezone_type": 3,
              "timezone": "UTC"
            },
            "roleDefault": "admin",
            "_embedded": {
              "businessUnit": {
                "id": 40,
                "name": "Sinésio Luiz",
                "document": "11314553712",
                "status": null,
                "country": null,
                "state": "RJ",
                "city": "São gonçalo",
                "address": "Dr. Porciúncula, 2424",
                "zipCode": "24411006",
                "segmentMarket": "mercado",
                "_links": {
                  "self": {
                    "href": "http://localhost/business-unit/40"
                  }
                }
              }
            },
            "_links": {
              "self": {
                "href": "http://localhost/user/121"
              }
            }
          },
          "businessUnit": {
            "id": 40,
            "name": "Sinésio Luiz",
            "document": "11314553712",
            "_links": {
              "self": {
                "href": "http://localhost/business-unit/40"
              }
            }
          }
        },
        "_links": {
          "self": {
            "href": "http://localhost/webhook-business-unit/49"
          }
        }
      }
    ]
  },
  "page_count": 1,
  "page_size": 25,
  "total_items": 1,
  "page": 1
}

Criar Webhook

POST https://api-v1.assine.online/webhook-business-unit

Cadastrar um novo webhook.

Headers

Request Body

{
  "id": 50,
  "url": "https://webhook.site/b2350d9a-5476-425b-bc98-7028fb8f1ee6",
  "_embedded": {
    "user": {
      "id": 121,
      "username": "sinesio.leao@soluti.com.br",
      "password": null,
      "status": "1",
      "name": "Sinésio Da silva",
      "email": "sinesio.leao@soluti.com.br",
      "position": "vendas",
      "cellphone": "5521967233131",
      "whatsappNumber": "5521967233131",
      "notifyWhatsapp": true,
      "document": null,
      "country": null,
      "state": null,
      "city": null,
      "address": null,
      "zipCode": null,
      "dateCreated": {
        "date": "2021-01-11 22:49:16.000000",
        "timezone_type": 3,
        "timezone": "UTC"
      },
      "dateLastUpdated": {
        "date": "2022-05-09 12:24:12.000000",
        "timezone_type": 3,
        "timezone": "UTC"
      },
      "roleDefault": "admin",
      "_embedded": {
        "businessUnit": {
          "id": 40,
          "name": "Sinésio Luiz",
          "document": "11314553712",
          "status": null,
          "country": null,
          "state": "RJ",
          "city": "São gonçalo",
          "address": "Dr. Porciúncula, 2424",
          "zipCode": "24411006",
          "segmentMarket": "mercado",
          "_links": {
            "self": {
              "href": "http://localhost/business-unit/40"
            }
          }
        }
      },
      "_links": {
        "self": {
          "href": "http://localhost/user/121"
        }
      }
    },
    "businessUnit": {
      "id": 40,
      "name": "Sinésio Luiz",
      "document": "11314553712",
      "_links": {
        "self": {
          "href": "http://localhost/business-unit/40"
        }
      }
    }
  },
  "_links": {
    "self": {
      "href": "http://localhost/webhook-business-unit/50"
    }
  }
}

Atualizar webhook

PATCH https://api-v1.assine.online/webhook-business-unit/1

Realizar alterações em webhooks previamente cadastrados.

Headers

Request Body

{
  "id": 1,
  "url": "https://webhook.site/b2350d9a-5476-425b-bc98-7028fb8f1ee6000",
  "_embedded": {
    "user": {
      "id": 121,
      "username": "sinesio.leao@soluti.com.br",
      "status": "1",
      "name": "Sinésio Da silva",
      "email": "sinesio.leao@soluti.com.br",
      "position": "vendas",
      "cellphone": "5521967233131",
      "whatsappNumber": "5521967233131",
      "notifyWhatsapp": true,
      "document": null,
      "country": null,
      "state": null,
      "city": null,
      "address": null,
      "zipCode": null,
      "dateCreated": {
        "date": "2021-01-11 22:49:16.000000",
        "timezone_type": 3,
        "timezone": "UTC"
      },
      "dateLastUpdated": {
        "date": "2022-05-09 12:24:12.000000",
        "timezone_type": 3,
        "timezone": "UTC"
      },
      "roleDefault": "admin",
      "_embedded": {
        "businessUnit": {
          "id": 40,
          "name": "Sinésio Luiz",
          "document": "11314553712",
          "status": null,
          "country": null,
          "state": "RJ",
          "city": "São gonçalo",
          "address": "Dr. Porciúncula, 2424",
          "zipCode": "24411006",
          "_links": {
            "self": {
              "href": "http://localhost/business-unit/1"
            }
          }
        }
      },
      "_links": {
        "self": {
          "href": "http://localhost/user/121"
        }
      }
    },
    "businessUnit": {
      "id": 40,
      "name": "Sinésio Luiz",
      "document": "11314553712",
      "status": null,
      "country": null,
      "state": "RJ",
      "city": "São gonçalo",
      "address": "Dr. Porciúncula, 2424",
      "zipCode": "24411006",
      "_links": {
        "self": {
          "href": "http://localhost/business-unit/1"
        }
      }
    }
  },
  "_links": {
    "self": {
      "href": "http://localhost/webhook-business-unit/1"
    }
  }
}

Remover webhook

DELETE https://api-v1.assine.online/webhook-business-unit/1

Remover um webhook

Headers

{
    // Response
}

Last updated