Create Track
Create Track with subentities uploaded files and SubTracks
Endpoint
POST api/track-create
Request Headers
{
"Authorization": "Bearer {token}",
"Content-Type": "application/json"
}
Request Body
{
name:Track Test 222-12
status:new
partner_id:2
deadline:2026-05-01
documents[cmr][0][note]:Note for doc
documents[cmr][0][file]: file.pdf
documents[cmr][1][file]: file.pdf
documents[vmd][0][file]: file.pdf
documents[proforma_invoice][0][file]: file.pdf
documents[commercial_invoice][0][file]: file.pdf
counterparty[name]:counterparty name 1
counterparty[info]:counterparty info 22
counterparty[documents][commercial_invoice][0][file]: file.pdf
partner_payments[0][price]:1500
partner_payments[0][currency]:USD
partner_payments[0][exchange]:42.65
partner_payments[0][documents][payment_files][0][file]: file.pdf
delivery_payments[0][name]:Delivery name
delivery_payments[0][amount]:5
delivery_payments[0][documents][logistic_block][0][file]: file.pdf
sub_tracks[0][name]:Sub track name
sub_tracks[0][status]:new
sub_tracks[0][partner_payments][0][price]:200
sub_tracks[0][partner_payments][0][currency]:USD
sub_tracks[0][partner_payments][0][exchange]:42.55
sub_tracks[0][counterparty][name]:1111111
sub_tracks[0][counterparty][info]:fwewfwefwef
sub_tracks[0][partner_payments][0][documents][payment_files][0][file]: file.pdf
sub_tracks[0][counterparty][documents][commercial_invoice][0][file]: file.pdf
}
Expected Response 200
{
"id": 23,
"name": "Track Test 111 222 333 - 12",
"status": "in_progress",
"done_date": null,
"partner_id": 1,
"deadline": "2026-05-01T00:00:00.000000Z",
"created_at": "2026-03-11T07:58:06.000000Z",
"updated_at": "2026-03-11T07:58:15.000000Z",
"partner": {
"id": 1,
"name": "New partner",
"irp_id": 444,
"created_at": "2026-03-06T14:53:12.000000Z",
"updated_at": "2026-03-06T14:53:12.000000Z"
},
"documents": [
{
"id": 1387,
"name": "Proforma Invoice",
"type": "proforma_invoice",
"documentable_type": "App\\Models\\Track",
"documentable_id": 23,
"created_at": "2026-03-11T07:58:06.000000Z",
"updated_at": "2026-03-11T07:58:06.000000Z",
"files": []
},
{
"id": 1388,
"name": "Commercial Invoice",
"type": "commercial_invoice",
"documentable_type": "App\\Models\\Track",
"documentable_id": 23,
"created_at": "2026-03-11T07:58:06.000000Z",
"updated_at": "2026-03-11T07:58:06.000000Z",
"files": []
},
{
"id": 1389,
"name": "Package List",
"type": "package_list",
"documentable_type": "App\\Models\\Track",
"documentable_id": 23,
"created_at": "2026-03-11T07:58:06.000000Z",
"updated_at": "2026-03-11T07:58:06.000000Z",
"files": []
},
{
"id": 1390,
"name": "Additional Documents",
"type": "additional_documents",
"documentable_type": "App\\Models\\Track",
"documentable_id": 23,
"created_at": "2026-03-11T07:58:06.000000Z",
"updated_at": "2026-03-11T07:58:06.000000Z",
"files": [
{
"id": 1350,
"document_id": 1390,
"file": "documents/QC7Y9usIsqjr0qKLdm3SUJKhjmaej8dxFLQXjjfI.pdf",
"note": null,
"created_at": "2026-03-11T08:47:45.000000Z",
"updated_at": "2026-03-11T08:47:45.000000Z"
}
]
},
{
"id": 1391,
"name": "VMD",
"type": "vmd",
"documentable_type": "App\\Models\\Track",
"documentable_id": 23,
"created_at": "2026-03-11T07:58:06.000000Z",
"updated_at": "2026-03-11T07:58:06.000000Z",
"files": []
},
{
"id": 1392,
"name": "CMR",
"type": "cmr",
"documentable_type": "App\\Models\\Track",
"documentable_id": 23,
"created_at": "2026-03-11T07:58:06.000000Z",
"updated_at": "2026-03-11T07:58:06.000000Z",
"files": []
},
{
"id": 1393,
"name": "Partner Pay To Supply",
"type": "partner_pay_to_supply",
"documentable_type": "App\\Models\\Track",
"documentable_id": 23,
"created_at": "2026-03-11T07:58:06.000000Z",
"updated_at": "2026-03-11T07:58:06.000000Z",
"files": []
}
],
"counterparties": [
{
"id": 70,
"name": "counterparty name",
"info": "counterparty info",
"created_at": "2026-03-11T07:58:06.000000Z",
"updated_at": "2026-03-11T07:58:15.000000Z",
"counterpartyable_type": "App\\Models\\Track",
"counterpartyable_id": 23,
"documents": [
{
"id": 1394,
"name": "Proforma Invoice",
"type": "proforma_invoice",
"documentable_type": "App\\Models\\Counterparty",
"documentable_id": 70,
"created_at": "2026-03-11T07:58:06.000000Z",
"updated_at": "2026-03-11T07:58:06.000000Z",
"files": [
{
"id": 1352,
"document_id": 1394,
"file": "documents/m9FF1dLmLMtWa6dXDA6Pl1t5FpyGUTBCHZzY75ZL.pdf",
"note": null,
"created_at": "2026-03-11T08:47:45.000000Z",
"updated_at": "2026-03-11T08:47:45.000000Z"
}
]
},
{
"id": 1395,
"name": "Commercial Invoice",
"type": "commercial_invoice",
"documentable_type": "App\\Models\\Counterparty",
"documentable_id": 70,
"created_at": "2026-03-11T07:58:06.000000Z",
"updated_at": "2026-03-11T07:58:06.000000Z",
"files": [
{
"id": 1351,
"document_id": 1395,
"file": "documents/YjQIAPSqfr72sO3yUd56Lsr7R9QbaqkbnZ6KLD0L.pdf",
"note": null,
"created_at": "2026-03-11T08:47:45.000000Z",
"updated_at": "2026-03-11T08:47:45.000000Z"
}
]
},
{
"id": 1396,
"name": "Package List",
"type": "package_list",
"documentable_type": "App\\Models\\Counterparty",
"documentable_id": 70,
"created_at": "2026-03-11T07:58:06.000000Z",
"updated_at": "2026-03-11T07:58:06.000000Z",
"files": [
{
"id": 1354,
"document_id": 1396,
"file": "documents/9u5JjT7hGEU5IxtiBRATI188hJR1APbcuNeDWQSZ.pdf",
"note": null,
"created_at": "2026-03-11T08:47:45.000000Z",
"updated_at": "2026-03-11T08:47:45.000000Z"
}
]
},
{
"id": 1397,
"name": "Additional Documents",
"type": "additional_documents",
"documentable_type": "App\\Models\\Counterparty",
"documentable_id": 70,
"created_at": "2026-03-11T07:58:06.000000Z",
"updated_at": "2026-03-11T07:58:06.000000Z",
"files": [
{
"id": 1353,
"document_id": 1397,
"file": "documents/G2HCJwoybdoOZiVj5OOf414jSv4Z3bTKl0TzvV94.pdf",
"note": null,
"created_at": "2026-03-11T08:47:45.000000Z",
"updated_at": "2026-03-11T08:47:45.000000Z"
}
]
}
]
}
],
"partner_payments": [
{
"id": 214,
"price": "15750.00",
"exchange": "43.21700",
"currency": "USD",
"created_at": "2026-03-11T08:47:45.000000Z",
"updated_at": "2026-03-11T08:47:45.000000Z",
"payable_type": "App\\Models\\Track",
"payable_id": 23,
"documents": [
{
"id": 1612,
"name": "Payment Files",
"type": "payment_files",
"documentable_type": "App\\Models\\PartnerPayment",
"documentable_id": 214,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": [
{
"id": 1355,
"document_id": 1612,
"file": "documents/7ZAXAknzQrvSxjvt1vba8uJOWfDNMqNUBXDHDgei.pdf",
"note": null,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z"
}
]
}
]
}
],
"delivery_payments": [
{
"id": 143,
"name": "Delivery name",
"amount": "5.00",
"delivery_note": null,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"payable_type": "App\\Models\\Track",
"payable_id": 23,
"documents": [
{
"id": 1613,
"name": "Logistic Block",
"type": "logistic_block",
"documentable_type": "App\\Models\\DeliveryPayment",
"documentable_id": 143,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": [
{
"id": 1356,
"document_id": 1613,
"file": "documents/EexN2TRMV8HJ1vGDzO0X5kXpyOrtwLR0ozO6WO64.pdf",
"note": null,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z"
},
{
"id": 1357,
"document_id": 1613,
"file": "documents/lJmme3TUFAbK9W81ZS0n5VUe1bTrqndFOiceUxsj.pdf",
"note": null,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z"
}
]
}
]
}
],
"sub_tracks": [
{
"id": 129,
"track_id": 23,
"name": "Sub track name",
"status": "new",
"deadline": null,
"done_date": null,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"documents": [
{
"id": 1614,
"name": "Proforma Invoice",
"type": "proforma_invoice",
"documentable_type": "App\\Models\\SubTrack",
"documentable_id": 129,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": [
{
"id": 1361,
"document_id": 1614,
"file": "documents/et0yq4A2U9oaONUH4tgLZIOUY4xKiRF8CT2eCJpW.pdf",
"note": null,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z"
}
]
},
{
"id": 1615,
"name": "Commercial Invoice",
"type": "commercial_invoice",
"documentable_type": "App\\Models\\SubTrack",
"documentable_id": 129,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": []
},
{
"id": 1616,
"name": "Package List",
"type": "package_list",
"documentable_type": "App\\Models\\SubTrack",
"documentable_id": 129,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": []
},
{
"id": 1617,
"name": "Additional Documents",
"type": "additional_documents",
"documentable_type": "App\\Models\\SubTrack",
"documentable_id": 129,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": [
{
"id": 1360,
"document_id": 1617,
"file": "documents/DOtg67jnbQTB8NezFyl6u9U3gM7WYdubNFbAPtVi.pdf",
"note": null,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z"
}
]
},
{
"id": 1618,
"name": "VMD",
"type": "vmd",
"documentable_type": "App\\Models\\SubTrack",
"documentable_id": 129,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": [
{
"id": 1359,
"document_id": 1618,
"file": "documents/lVPkQrRQ3OKg32YNxAvbuZhnLEagrrVtgZzY9maE.pdf",
"note": null,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z"
}
]
},
{
"id": 1619,
"name": "CMR",
"type": "cmr",
"documentable_type": "App\\Models\\SubTrack",
"documentable_id": 129,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": [
{
"id": 1358,
"document_id": 1619,
"file": "documents/QlCUMyWP614PNQXUXSh0ACfd6bFGxLKsocOipzVD.pdf",
"note": null,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z"
}
]
},
{
"id": 1620,
"name": "Partner Pay To Supply",
"type": "partner_pay_to_supply",
"documentable_type": "App\\Models\\SubTrack",
"documentable_id": 129,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": []
}
],
"partner_payments": [
{
"id": 215,
"price": "362.00",
"exchange": "43.10000",
"currency": "USD",
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"payable_type": "App\\Models\\SubTrack",
"payable_id": 129,
"documents": [
{
"id": 1621,
"name": "Payment Files",
"type": "payment_files",
"documentable_type": "App\\Models\\PartnerPayment",
"documentable_id": 215,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": [
{
"id": 1362,
"document_id": 1621,
"file": "documents/nybYUFjmH4X17SNz3PsXd4bboDe82w9lJA97rOto.pdf",
"note": null,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z"
}
]
}
]
}
],
"delivery_payments": [
{
"id": 144,
"name": "qwe",
"amount": "3212222.00",
"delivery_note": null,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"payable_type": "App\\Models\\SubTrack",
"payable_id": 129,
"documents": [
{
"id": 1622,
"name": "Logistic Block",
"type": "logistic_block",
"documentable_type": "App\\Models\\DeliveryPayment",
"documentable_id": 144,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": [
{
"id": 1363,
"document_id": 1622,
"file": "documents/JHtPgpiXugWfNOsng5d8oioohFneBfnjenOgjETp.pdf",
"note": null,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z"
}
]
}
]
}
]
},
{
"id": 130,
"track_id": 23,
"name": "ADD SUB",
"status": "in_progress",
"deadline": null,
"done_date": null,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"documents": [
{
"id": 1623,
"name": "Proforma Invoice",
"type": "proforma_invoice",
"documentable_type": "App\\Models\\SubTrack",
"documentable_id": 130,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": []
},
{
"id": 1624,
"name": "Commercial Invoice",
"type": "commercial_invoice",
"documentable_type": "App\\Models\\SubTrack",
"documentable_id": 130,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": []
},
{
"id": 1625,
"name": "Package List",
"type": "package_list",
"documentable_type": "App\\Models\\SubTrack",
"documentable_id": 130,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": []
},
{
"id": 1626,
"name": "Additional Documents",
"type": "additional_documents",
"documentable_type": "App\\Models\\SubTrack",
"documentable_id": 130,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": []
},
{
"id": 1627,
"name": "VMD",
"type": "vmd",
"documentable_type": "App\\Models\\SubTrack",
"documentable_id": 130,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": []
},
{
"id": 1628,
"name": "CMR",
"type": "cmr",
"documentable_type": "App\\Models\\SubTrack",
"documentable_id": 130,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": [
{
"id": 1364,
"document_id": 1628,
"file": "documents/yN3R15FtoK6LNtfNvzIfhQ8XEDlTym5jyPTLp5Fu.pdf",
"note": null,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z"
}
]
},
{
"id": 1629,
"name": "Partner Pay To Supply",
"type": "partner_pay_to_supply",
"documentable_type": "App\\Models\\SubTrack",
"documentable_id": 130,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": []
}
],
"partner_payments": [
{
"id": 216,
"price": "954.00",
"exchange": "52.11040",
"currency": "USD",
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"payable_type": "App\\Models\\SubTrack",
"payable_id": 130,
"documents": [
{
"id": 1630,
"name": "Payment Files",
"type": "payment_files",
"documentable_type": "App\\Models\\PartnerPayment",
"documentable_id": 216,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": [
{
"id": 1365,
"document_id": 1630,
"file": "documents/cR1JwxPJpeJlsRCgtdWQDyxsKELuHFspHr6yKcqb.pdf",
"note": null,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z"
}
]
}
]
}
],
"delivery_payments": [
{
"id": 145,
"name": "del name",
"amount": "3210.00",
"delivery_note": null,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"payable_type": "App\\Models\\SubTrack",
"payable_id": 130,
"documents": [
{
"id": 1631,
"name": "Logistic Block",
"type": "logistic_block",
"documentable_type": "App\\Models\\DeliveryPayment",
"documentable_id": 145,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z",
"files": [
{
"id": 1366,
"document_id": 1631,
"file": "documents/EInbz1oW3830qlTdLij7pHpwEC5F8f9EVtUBTixc.pdf",
"note": null,
"created_at": "2026-03-11T08:47:46.000000Z",
"updated_at": "2026-03-11T08:47:46.000000Z"
}
]
}
]
}
]
}
]
}
Error Response 401
wrong token
{
"message": "Unauthenticated."
}
Error Response 500
Server error.
{
"message": "Internal server error"
}
11 March 2026