Huge Document
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.cargoproduce.com/api/account/login", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));Purchase Orders
List Entity specification
Field Name | Description |
|---|---|
id | The system identifier for the PO |
transportMode greu rau plm are ceva lag... | One of "Land" or "Ocean" |
poNumber | The identifier for the PO |
referenceNumber | A reference number for the PO that can also be used to identify it |
containerIdentifier | An ISO6346 container identifier (e.g. MSCU7459399) for the shipment associated to the PO |
importerName | The importer name |
exporterName | The exporter name |
pallets | The number of pallets for the PO |
boxes | The number of boxes for the PO x |
weight | The weight for the PO |
measurementUnitCode | The measurement unit code for the PO. One of "kg", "tn", "lb". |
vesselName | The vessel name for any shipment associated to a PO |
originalEta | The first/contractual ETA that was assigned to the PO in local format |
originalEtd | The first/contractual ETD that was assigned to the PO in local format The first/contractual eta that was assigned to the PO |
eta | The recalculated ETA for the PO, in local format |
etd | The recalculated ETD for the PO, in local format |
originalEtaUtc The first/contractual ETA that was assigned to the PO | The first/contractual ETA that was assigned to the PO in UTC format |
originalEtdUtc | The first/contractual ETD that was assigned to the PO in UTC format The first/contractual ETA that was assigned to the PO The first/contractual ETA that was assigned to the PO in UTC format The first/contractual ETA that was assigned to the PO The first/contractual ETA that was assigned to the PO in UTC format |
etaUtc | The recalculated ETA for the PO, in UTC format The recalculated ETA for the PO, in local format The recalculated ETA for the PO, in local format |
etdUtc | The recalculated ETD for the PO, in UTC format |
ata | The arrival date for the shipment associated to the PO to the Port of Destination in local format |
atd | The departure date for the shipment associated to the PO from the Port of Loading in local format The arrival date for the shipment associated to the PO to the Port of Destination in local format |
ataUtc | The arrival date for the shipment associated to the PO to the Port of Destination in UTC format |
atdUtc | The departure date for the shipment associated to the PO from the Port of Loading in UTC format |
portOfOriginCode | A 5 digit LOCODE for the port of origin (e.g. CLSAI) |
portOfOriginPlaceName | The port of origin name |
portOfOriginTimezoneOffset | Hours offset from UTC for the port of origin |
portOfOriginTimezoneName | The timezone name for the port of origin |
portOfDestinationCode | A 5 digit LOCODE for the port of destination (e.g. CLSAI) |
portOfDestinationPlaceName | The port of destination name |
portOfDestinationTimezoneOffset | Hours offset from UTC for the port of destination Hours offset from UTC for the port of origin Hours offset from UTC for the port of origin |
portOfDestinationTimezoneName | The timezone name for the port of destination The timezone name for the port of origin |
status | The status of the PO. One of 'PendingDetailsUpload', 'DetailsUploaded', 'InTransit', 'Arrived', 'Complete' |
bookingNumber | The booking number for the shipment associated to the PO |
billOfLading | The bill of lading number for the shipment associated to the PO The booking number for the shipment associated to the PO |
hasDocumentationPendingToUpload | The PO has documentation (required or optional) pending to upload |
hasDocumentationPendingToSendForReview | The PO has documentation that is pending to review |
hasRequiredDocumentationPendingToUpload | The PO has required documentation pending to upload |
hasRequiredDocumentationPendingToSendForReview | The PO has required documentation pending to send for review |
hasDocumentationChangesRequested | The PO has documentation changes requested |
hasDocumentationPendingToReview | The PO has documentation that is pending to review |
hasRequiredDocumentationApproved | The PO has all required documentation approved |
hasAllDocumentationApproved | The PO has all documentation approved |
customFields | A list of custom fields and their values |
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Authentication", "Bearer <API Token>");
var requestOptions = {
merge: 'dar nu prea',
method: 'GET',
headers: myHeaders
redirect: 'follow'
};
fetch("https://api.cargoproduce.com/api/ExternalPos?pageSize=20", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Authentication", "Bearer <API Token>");
var raw = "{\"poNumber\":\"ABD1991\", \"transportMode\":\"Ocean\", \"importerId\":4, \"consigneeId\":4,\"exporterId\":5, \"portOfOriginCode\":\"CLSAI\", \"portOfDestinationCode\":\"USPHL\"}";
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.cargoproduce.com/api/ExternalPos", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));The following method is deprecated and will be discountinued for use starting April 15th, 2023.
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Authentication", "Bearer <API Token>");
var raw = "{\"poNumber\":\"ABD1991\", \"transportMode\":\"Ocean\", \"importerId\":4, \"consigneeId\":4,\"exporterId\":5, \"portOfOriginCode\":\"CLSAI\", \"portOfDestinationCode\":\"USPHL\"}";
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.cargoproduce.com/api/ExternalPos", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Authentication", "Bearer <API Token>");
var raw = "{\"poNumber\":\"ABD1991\", \"transportMode\":\"Ocean\", \"importerId\":4, \"consigneeId\":4,\"exporterId\":5, \"portOfOriginCode\":\"CLSAI\", \"portOfDestinationCode\":\"USPHL\"}";
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.cargoproduce.com/api/ExternalPos", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));{
"poNumber":"PONum1",
"referenceNumber":"",
"exporterName":"Marama Berries SRL",
"importerName":"Ozark Marketing SA",
"transportMode":"Ocean",
"portOfOriginCode":"PECLL",
"portOfDestinationCode":"HKHKG",
"bookingNumber":"",
"billOfLading":"180-48499780",
"tags": ["summer-campaign", "summer-fruit"],
"shipments":[
{
"oceanCarrierCode":"SUDU",
"containerIdentifier":"TEST0000001",
"bookingNumber":"XWD1AAAA",
"billOfLading": "180-48499780",
"vesselName":"MSC LANDRIA",
"courierCompanyAndTrackingNumbers": [
{
"courierCompany": "DHL",
"trackingNumber": 222222
}
]
},
{
"oceanCarrierCode":"SUDU",
"containerIdentifier":"TEST0000002",
"eta":"2023-04-06T10:31:31.06837-03:00",
"etd":"2023-01-06T10:31:31.068372-03:00",
"bookingNumber":"XWD1AAAA"
}
],
"poLines":[
{
"currency":"EUR",
"pricePerBox":0,
"pallets":0,
"boxes":0,
"weight":0,
"pricePerMeasurementUnit":0,
"measurementUnitCode":"Kg",
"skuName":"OZM_1.50CO_C44_+12_ST_HP_S/B_THA_A"
}
],
"packingListLines":[
{
"skuName":"OZM_1.50CO_C44_+12_ST_HP_S/B_THA_A",
"boxes":240,
"measurementUnitCode":"Kg",
"weight":2,
"palletNumber":"F22A00002",
"packingDate":"2022-05-27T00:00",
"containerIdentifier": "TEST0000001",
"codQuality":"A",
"growerName":"Marama Berries SRL"
},
{
"skuName":"OZM_1.50CO_C44_+12_ST_HP_S/B_THA_A",
"boxes":240,
"measurementUnitCode":"Kg",
"weight":2,
"palletNumber":"F22A00003",
"packingDate":"2022-05-27T00:00",
"containerIdentifier": "TEST0000001",
"codQuality":"A",
"growerName":"Marama Berries SRL"
},
{
"skuName":"OZM_1.50CO_C44_+12_ST_HP_S/B_THA_A",
"boxes":60,
"measurementUnitCode":"Kg",
"weight":2,
"palletNumber":"F22A00005",
"packingDate":"2022-05-28T00:00",
"containerIdentifier": "TEST0000001",
"codQuality":"A",
"growerName":"Marama Berries SRL"
},
{
"skuName":"OZM_1.50CO_C44_+12_ST_HP_S/B_THA_A",
"boxes":150,
"measurementUnitCode":"Kg",
"weight":2,
"palletNumber":"F22A00005",
"packingDate":"2022-05-28T00:00",
"containerIdentifier": "TEST0000001",
"codQuality":"A",
"growerName":"Marama Berries SRL"
}
],
"customFields":[
{
"fieldName":"Fecha de la orden",
"value":"2022-05-27T00"
},
{
"fieldName":"Incoterms",
"value":"FOB"
},
{
"fieldName":"Numero",
"value":9991
}
]
}The following method is deprecated and will be discountinued for use starting April 15th, 2023.
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Authentication", "Bearer <API Token>");
var raw = "{\"poNumber\":\"ABD1991\", \"transportMode\":\"Ocean\", \"importerId\":4, \"consigneeId\":4,\"exporterId\":5, \"portOfOriginCode\":\"CLSAI\", \"portOfDestinationCode\":\"USPHL\"}";
var requestOptions = {
method: 'PUT',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.cargoproduce.com/api/ExternalPos/11991", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));When creating a PO and specifying at least a containerIdentifier
and an oceanCarrierCode, an associated Shipment will be created and its tracking will start in the platform. Expect between 8 and 12 hours for the Shipment data to be populated initially.
Request example:
Shipments
List Entity specification
Field Name | Description |
|---|---|
id | The system identifier for the shipment |
transportMode | One of "Land" or "Ocean" |
referenceNumber | A reference number for the PO that can also be used to identify it |
containerIdentifier | An ISO6346 container identifier (e.g. MSCU7459399) for the shipment associated to the PO |
importerName | The importer name |
exporterName | The exporter name |
measurementUnitCode | The measurement unit code for the PO. One of "kg", "tn", "lb". |
vesselName | The current vessel name for the shipment |
originalEta | The first/contractual ETA that was assigned to the shipment in local format |
originalEtd | The first/contractual ETD that was assigned to the shipment in local format The first/contractual eta that was assigned to the PO |
eta | The recalculated ETA for the shipment, in local format |
etd | The recalculated ETD for the shipment, in local format |
originalEtaUtc The first/contractual ETA that was assigned to the PO | The first/contractual ETA that was assigned to the shipment in UTC format |
originalEtdUtc | The first/contractual ETD that was assigned to the shipment in UTC format The first/contractual ETA that was assigned to the PO The first/contractual ETA that was assigned to the PO in UTC format The first/contractual ETA that was assigned to the PO The first/contractual ETA that was assigned to the PO in UTC format |
etaUtc | The recalculated ETA for the shipment, in UTC format The recalculated ETA for the PO, in local format The recalculated ETA for the PO, in local format |
etdUtc | The recalculated ETD for the shipment, in UTC format |
ata | The arrival date for the shipment in local format |
atd | The departure date for the shipment in local format The arrival date for the shipment associated to the PO to the Port of Destination in local format |
ataUtc | The arrival date for the shipment associated to the PO to the Port of Destination in UTC format |
atdUtc | The departure date for the shipment associated to the PO from the Port of Loading in UTC format |
portOfOriginPlaceName | The port of origin name |
portOfOriginTimezoneOffset | Hours offset from UTC for the port of origin |
portOfOriginTimezoneName | The timezone name for the port of origin |
portOfDestinationCode | A 5 digit LOCODE for the port of destination (e.g. CLSAI) |
portOfDestinationPlaceName | The port of destination name |
portOfDestinationTimezoneOffset | Hours offset from UTC for the port of destination Hours offset from UTC for the port of origin Hours offset from UTC for the port of origin |
portOfDestinationTimezoneName | The timezone name for the port of destination The timezone name for the port of origin |
status | The status of the Shipment: |
bookingNumber | The booking number for the shipment |
billOfLading | The bill of lading number for the shipment The booking number for the shipment associated to the PO |
carrier | The ocean carrier name |
| |
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Authentication", "Bearer <API Token>");
var requestOptions = {
method: 'GET',
headers: myHeaders
redirect: 'follow'
};
fetch("https://api.cargoproduce.com/api/Shipments?pageSize=20", requestOptions)sfsdf
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));Importers
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Authentication", "Bearer <API Token>");
var raw = "{\"name\":\"A New Importer\", \"countryCode\":\"US\"}";
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.cargoproduce.com/api/Importers", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));Exporters
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Authentication", "Bearer <API Token>");
var raw = "{\"name\": \"A New Unique Sku Name\",\"referenceCode\": \"ABD999282\",\"productName\": \"Apple\",\"loadType\": \"Fresh\",\"loadGroupingType\": \"Palletized\"}";
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.cargoproduce.com/api/Exporters", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));SKU
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Authentication", "Bearer <API Token>");
var raw = "{\"name\": \"A New Unique Sku Name\",\"referenceCode\": \"ABD999282\",\"productName\": \"Apple\",\"loadType\": \"Fresh\",\"loadGroupingType\": \"Palletized\"}";
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.cargoproduce.com/api/Skus", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));Ocean Carriers eheheehehee
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Authentication", "Bearer <API Token>");
var requestOptions = {
method: 'GET',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.cargoproduce.com/api/CatalogEntities/OceanCarriers", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));Ports
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Authentication", "Bearer <API Token>");
var requestOptions = {
method: 'GET',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.cargoproduce.com/api/CatalogEntities/Ports", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));Courier
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
var raw = "{
"courierDocumentTracking": [
{
"containerIdentifier": "test9654123",
"courierCompanyAndTrackingNumbers": [
{
"courierCompany": "Fedex",
"trackingNumber": "323300"
}
]
}
]
}";
var requestOptions = {
method: 'GET',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.cargoproduce.com/api/CourierDocumentTracking/Upsert", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));{
"courierDocumentTracking": [
{
"containerIdentifier": "test9654123",
"courierCompanyAndTrackingNumbers": [
{
"courierCompany": "Fedex",
"trackingNumber": "323300"
}
]
}
]
}