Passar para o conteúdo principal

Supply

Atualizado essa semana

Webhook payload model for supply transaction events.

Fields

- date (string): ISO 8601 timestamp of the event.

- action (string): Action performed on the transaction (e.g., "created", "updated", "deleted").

- target (string): Target of the action (e.g., "supplyTransaction").

- targetId (string): ID of the affected transaction.

- byUserId (string): ID of the user who triggered the event.

- companyId (string): Company ID associated with the transaction.

- newData (SupplyTransactionsData): Struct containing the new state of the transaction.

- oldData (SupplyTransactionsData): Struct containing the previous state of the transaction.

SupplyTransactionsData Struct

The SupplyTransactionsData struct contains the following fields:

- id (string): Transaction ID.

- type (string): Transaction type (e.g., "withdrawal", "inbound", "adjustment").

- reason (string): Reason for the transaction.

- number (int): Sequential number.

- inboundId (string): Associated inbound record ID.

- reservationId (string): Associated reservation ID.

- companyId (string): Company ID.

- createdAt (string): ISO 8601 creation timestamp.

- createdByUserId (string): Creator user ID.

- updatedAt (string): ISO 8601 last update timestamp.

- updatedByUserId (string): Last updater user ID.

- workOrderIds ([]string): Associated work order IDs.

- externalId (string): External system identifier.

Example (JSON)

{

"date": "2025-09-29T18:04:03Z",

"action": "created",

"target": "supplyTransaction",

"targetId": "transaction-001",

"byUserId": "user-abc",

"companyId": "company-xyz",

"newData": {

"id": "transaction-001",

"type": "withdrawal",

"reason": "Replacement of worn bearing",

"number": 34,

"inboundId": "inbound-001",

"reservationId": "reservation-007",

"companyId": "company-xyz",

"createdAt": "2025-09-29T18:04:03Z",

"createdByUserId": "user-abc",

"updatedAt": "2025-09-29T18:04:03Z",

"updatedByUserId": "user-abc",

"workOrderIds": [

"wo-123",

"wo-124"

],

"externalId": "ext-txn-001"

},

"oldData": {

"id": "transaction-001",

"type": "withdrawal",

"reason": "",

"number": 34,

"inboundId": "inbound-001",

"reservationId": "reservation-007",

"companyId": "company-xyz",

"createdAt": "2025-09-29T18:04:03Z",

"createdByUserId": "user-abc",

"updatedAt": "2025-09-29T18:04:03Z",

"updatedByUserId": "user-abc",

"workOrderIds": [],

"externalId": ""

}

}

Respondeu à sua pergunta?