Billing events
This section gives examples of billing event payloads sent by Shipwell to custom webhooks.
bill.created
Example
{
"1": {
"id": "a6e42112-929e-42ca-8424-25b9f8f764b1",
"vendor": {
"id": "826bacd1-e08f-4cf7-9a5e-cfda4d1cbf5c",
"self_link": "/v2/companies/826bacd1-e08f-4cf7-9a5e-cfda4d1cbf5c/",
"resource_type": "company"
},
"balance": 0,
"due_date": null,
"shipment": {
"id": "0dbf9dba-19a5-4f22-aec0-22a1be63cc3c",
"self_link": "/v2/shipments/0dbf9dba-19a5-4f22-aec0-22a1be63cc3c/",
"resource_type": "shipment"
},
"documents": [],
"self_link": "/v2/billing/bills/a6e42112-929e-42ca-8424-25b9f8f764b1",
"doc_number": "B376QR",
"line_items": [{
"id": "351543c9-98ef-488a-b081-de5b5c92d6e0",
"amount": 235.0,
"charge_code": "SF",
"description": "Service Fee",
"resource_type": "bill.line_item"
}, {
"id": "460fb2b2-1be2-446b-b469-ddd5649ea29f",
"amount": 1000.0,
"charge_code": "FSC",
"description": "Fuel Surcharge",
"resource_type": "bill.line_item"
}],
"resource_type": "bill",
"created_by_user": {
"id": "1984ac79-eac9-4a78-9640-e24a2c0f3b4f",
"self_link": "/v2/companies/a54ef012-77d4-44a0-8ba5-115b09b655be/users/1984ac79-eac9-4a78-9640-e24a2c0f3b4f/",
"resource_type": "user"
},
"transaction_date": "2020-07-08",
"processing_status": "SUCCESS",
"created_by_company": {
"id": "a54ef012-77d4-44a0-8ba5-115b09b655be",
"self_link": "/v2/companies/a54ef012-77d4-44a0-8ba5-115b09b655be/",
"resource_type": "company"
}
}
}
bill.updated
Example
{
"id": "01GQQDJ209WJ63PQDVN0XD2WS5",
"occurred_at": "2023-01-26T16:11:18.479109+00:00",
"source": {
"user_id": "user_id",
"company_id": "company_id",
"request_id": "7841e6f4-adb0-40cb-a593-eda81a705f69",
"publishing_system": "backend",
"environment": "prod"
},
"event_name": "bill.updated",
"details": {
"id": "c39596c7-ce9b-419a-bc1d-4287bf6803c0",
"new_data": {
"doc_number": "XAGR79-1"
},
"old_data": {
"doc_number": "XAGR79"
},
"self_link": "/v2/billing/bills/c39596c7-ce9b-419a-bc1d-4287bf6803c0",
"resource_type": "bill"
}
}
bill.creation_requested
Example
{
"1": {
"id": "0b9382f5-1587-45b6-954d-51c18a941571",
"vendor": {
"id": "da3aa6f1-4b61-4557-83c3-009f05b265f2",
"self_link": "/v2/companies/da3aa6f1-4b61-4557-83c3-009f05b265f2/",
"resource_type": "company"
},
"balance": 0,
"due_date": "2020-06-30",
"shipment": {
"id": "6f7a37d3-3a0e-4c6e-93e3-65183b685650",
"self_link": "/v2/shipments/6f7a37d3-3a0e-4c6e-93e3-65183b685650/",
"resource_type": "shipment"
},
"documents": [],
"self_link": "/v2/billing/bills/0b9382f5-1587-45b6-954d-51c18a941571",
"doc_number": "A3W6GJ",
"line_items": [{
"id": "5ff9e4c7-a933-4521-b709-c6cc5eb42f76",
"amount": 234.0,
"charge_code": "LH",
"description": "Line Haul",
"resource_type": "bill.line_item"
}],
"resource_type": "bill",
"created_by_user": {
"id": "3ff8c05a-a14a-4433-99b3-2f2af0fe669b",
"self_link": "/v2/companies/a54ef012-77d4-44a0-8ba5-115b09b655be/users/3ff8c05a-a14a-4433-99b3-2f2af0fe669b/",
"resource_type": "user"
},
"transaction_date": "2020-06-26",
"processing_status": "PROCESSING",
"created_by_company": {
"id": "a54ef012-77d4-44a0-8ba5-115b09b655be",
"self_link": "/v2/companies/a54ef012-77d4-44a0-8ba5-115b09b655be/",
"resource_type": "company"
}
}
}
bill.line_item.updated
Example
{
"1": {
"id": "017e1268-bc09-497f-873c-6304905f9457",
"bill": {
"id": "c6d6732a-2b51-4d2e-a615-bea920e03d0d",
"self_link": "/v2/billing/bills/c6d6732a-2b51-4d2e-a615-bea920e03d0d",
"resource_type": "bill"
},
"amount": 1202.0,
"self_link": "/v2/billing/bills/c6d6732a-2b51-4d2e-a615-bea920e03d0d",
"unit_name": "Line Haul",
"charge_code": "LH",
"custom_data": null,
"description": "Line Haul",
"unit_amount": 1202.0,
"resource_type": "bill.line_item",
"unit_quantity": 1.0,
"prepaid_amount": 0.0
},
"2": {
"id": "017e1268-bc09-497f-873c-6304905f9457",
"bill": {
"id": "c6d6732a-2b51-4d2e-a615-bea920e03d0d",
"self_link": "/v2/billing/bills/c6d6732a-2b51-4d2e-a615-bea920e03d0d",
"resource_type": "bill"
},
"amount": 1202.0,
"category": "LH",
"self_link": "/v2/billing/bills/c6d6732a-2b51-4d2e-a615-bea920e03d0d",
"unit_name": "Line Haul",
"custom_data": null,
"description": "Line Haul",
"unit_amount": 1202.0,
"resource_type": "bill.line_item",
"unit_quantity": 1.0,
"prepaid_amount": 0.0
}
}