Create - Auctions/Shipments
POST/api/auction
Create a new auction
Request
Header Parameters
Apikey of a company linked to a user
- application/json
Body
For the creation of Auctions; both public and private.
Take into account which data fields are mandatory and which ones will be optional.
Price at which the auction is automatically won.
Load CM if the load type is package.
Cargo height. Take into account the value of is_imperial_measure to determine if it's in cm/
Origin loading method type ('back', 'up', 'side')
Destination loading method type ('back', 'up', 'side')
Weight of the Cargo. Consider the value of is_imperial_measure to determine if it's in kg/lb
Auction end date.
Auction start date.
ID of the destination address.
Extra time in minutes with respect to the etd_date in which the merchandise can be delivered.
Extra time in minutes compared to the etl_date in which the merchandise can be collected.
HS Code of the load.
Boolean indicating that there are load methods at source.
Boolean indicating that there are load methods on the destination.
Delivery date and time.
ID of the source address.
Load temperature if necessary.
Pickup date and time.
Boolean that indicates if the load is fresh.
Trailer plate in case the type of cargo is a trailer.
Boolean to indicate if the measurements are in KG/CM or LB/IN
Boolean that indicates if the load is palletized.
Number of pallets if the load is palletized.
Type of pallets, 'European', 'American' or 'none'.
Initial bid price.
Type of cargo, it can be 'pallets', 'full', 'package' or 'trailer'.
Responses
- 200
- 400
Example response
- application/json
- Schema
- Example (from schema)
Schema
data object
This is the complete Auction object. Please note that there will be fields that are for internal use of the database or server and cannot be modified during the editing or creation of the object.
Possible values: non-empty
, Value must match regular expression ^[0-9a-fA-F]{24}$
Internal ID for database usage.
Default value: 0
Number of bids in the auction
Possible values: non-empty
Date on which it has been canceled by the Company
Possible values: non-empty
Date on which it has been canceled by the Carrier (TruckerCia)
Possible values: <= 4500
Default value: 0
Cargo height. Take into account the value of is_imperial_measure to determine if it's in cm/inch
Possible values: [pallets
, full
, package
, trailer
]
Type of Shipment: Parcel, Palletized, Full Load, Linear Meters
Possible values: <= 24000
Weight of the Cargo. Consider the value of is_imperial_measure to determine if it's in kg/lb
Possible values: non-empty
This field will be for internal use (yours) for organizing auctions and deliveries.
Possible values: non-empty
End date of the auction. Bids will be accepted until this date. If there are no bids by this date, it is considered 'empty'.
Possible values: non-empty
Start date of the auction. It is considered Draft if this field is null; and planned if it has any value > NOW().
Possible values: non-empty
Its value will be true if notifications have been sent upon completion.
etd_address object
Shipping / Pickup Addresses. They are necessary for the calculation of costs, routes, and general operation of the platform to be correct. Keep in mind that we will use both GPS coordinates and postal codes to manage and verify that all data is correct; therefore, it is important that they are accurate. In case any data is incorrectly entered, consider that they will be recorded in the contract and all legal documents of the process.
Possible values: non-empty
, Value must match regular expression ^[0-9a-fA-F]{24}$
Internal ID for database usage.
Possible values: non-empty
City of the address
Possible values: non-empty
Name of the destination company. It will be used for data verification.
Possible values: >= 3 characters
and <= 20 characters
https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
GPS location position
Possible values: non-empty
Name (or nickname) you give to the address for your use
Possible values: non-empty
Complete data
Possible values: non-empty
User's contact phone number
Possible values: non-empty
Province of the address
Possible values: non-empty
Province or Community of the address. In case it's not compatible with the address format, it may remain empty.
Possible values: non-empty
Physical address; street, avenue, etc.
Possible values: non-empty
House number of the address
Possible values: non-empty
Postal code of the address. It will depend on the country for the use of one format or another.
Possible values: non-empty
, [back
, lateral
, superior
]
Default value: back
Allowed loading methods for the ETD cargo
Possible values: non-empty
Delivery date. If there is a time margin, consider the start time.
Possible values: <= 99999
Default value: 0
Extra time range from the etd_date. Corresponds to the number of minutes between the delivery date and the time range. For example, if the etd_date is at 08:00, this will be the number of minutes for the delivery at 08:05.
etl_address object
Shipping / Pickup Addresses. They are necessary for the calculation of costs, routes, and general operation of the platform to be correct. Keep in mind that we will use both GPS coordinates and postal codes to manage and verify that all data is correct; therefore, it is important that they are accurate. In case any data is incorrectly entered, consider that they will be recorded in the contract and all legal documents of the process.
Possible values: non-empty
, Value must match regular expression ^[0-9a-fA-F]{24}$
Internal ID for database usage.
Possible values: non-empty
City of the address
Possible values: non-empty
Name of the destination company. It will be used for data verification.
Possible values: >= 3 characters
and <= 20 characters
https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
GPS location position
Possible values: non-empty
Name (or nickname) you give to the address for your use
Possible values: non-empty
Complete data
Possible values: non-empty
User's contact phone number
Possible values: non-empty
Province of the address
Possible values: non-empty
Province or Community of the address. In case it's not compatible with the address format, it may remain empty.
Possible values: non-empty
Physical address; street, avenue, etc.
Possible values: non-empty
House number of the address
Possible values: non-empty
Postal code of the address. It will depend on the country for the use of one format or another.
Possible values: non-empty
, [back
, lateral
, superior
]
Default value: back
Allowed loading methods for the ETL cargo
Possible values: non-empty
Pickup date. If there is a time margin, consider the start time.
Possible values: <= 9999
Default value: 0
Extra time range from the etl_date. Corresponds to the number of minutes between the pickup date and the time range. For example, if the etd_date is at 08:00, this will be the number of minutes for the delivery at 08:05.
Possible values: >= -273
and <= 1000
Default value: 0
If is_fresh is True, this value is required. And it will be the optimal cargo temperature.
It has a loading method at the Destination
It has a loading method at the Origin
European Harmonization Code. https://trade.ec.europa.eu/access-to-markets/en/content/harmonised-system-0
If the shipment is refrigerated. Check the fresh_cargo_temp field.
To indicate whether we will use Imperial metrics (Pounds, inches) or Decimal metrics (cm, kg)
If the shipment is palletized. Check the cargo_type field.
Default value: 0
The linear meters of the shipment. Check the cargo_type field.
Possible values: <= 66
Default value: 0
Number of pallets in the shipment.
Possible values: non-empty
, [european
, american
, none
]
Default value: european
Type of pallet to use. It will be used for volume calculations, measurements, and legal checks. Consider the value of the is_pallet field.
Trailer license plate, in case the shipment type is directly a trailer. It is not the same as Full Load. The format of the license plate will depend on the country.
Unique code generated upon the creation of the auction. It serves as a traceability code for the entire shipment, from creation to delivery.
Signature image of the loader. It is in Base64 format.
Signature image of the carrier. It is in Base64 format.
If it has been signed by the Company (Loader)
Possible values: non-empty
Date on which it has been signed by the Company
If it has been notified to be signed by the Carrier (TruckerCia)
If it has been signed by the Carrier (TruckerCia)
Possible values: non-empty
Date on which it has been signed by the Carrier (TruckerCia)
If it has been notified to be signed by the Company (Loader)
Possible values: [draft
, planned
, published
, empty
, awarded
, approved
, locked
, canceled
, rejected
]
Default value: draft
This is the current status of the auction. It will not be editable. The status will be modified depending on the values, conditions of the auction. draft - Draft planned - Planned published - Published empty - Empty, no Bids awarded - Awarded approved - Approved, in Shipping process canceled - Canceled by the Company rejected - Rejected by the Trucker
Possible values: non-empty
Date of the last modification of the object
{
"status": "string",
"data": {
"_id": "string",
"bids_count": 0,
"cancelled_company_date": "2019-09-20T16:03:18.575Z",
"cancelled_trucker_date": "2019-09-20T16:03:18.575Z",
"cargo_height": 0,
"cargo_type": "pallets",
"cargo_weight": 2500,
"createdAt": "2019-09-20T16:03:18.575Z",
"custom_code": "string",
"date_end": "2019-09-20T16:03:18.575Z",
"date_start": "2019-09-20T16:03:18.575Z",
"deletedAt": "2019-09-20T16:03:18.575Z",
"email_end_notified": true,
"etd_address": {
"_id": "5d84f846b0f6ba698f544dbf",
"city": "vigo",
"company_name": "ABC Logistics",
"country": "españa",
"location": {
"coordinates": [
-8.7207,
42.2406
],
"type": "Point"
},
"name": "ABC Logistics Vigo",
"name_address": "Aduana, 4, Rúa Concepción Arenal, Santiago de Vigo, Vigo, Pontevedra, Galicia, 36201, España",
"phone": "+34981234567",
"province": "Pontevedra",
"state": "galicia",
"street_address": "Rúa Concepción Arenal",
"street_number": "4",
"zipcode": "36201"
},
"etd_cargo_method": "back",
"etd_date": "2019-09-20T16:03:18.575Z",
"etd_extra_time": 1,
"etl_address": {
"_id": "5d84f846b0f6ba698f544dbf",
"city": "vigo",
"company_name": "ABC Logistics",
"country": "españa",
"location": {
"coordinates": [
-8.7207,
42.2406
],
"type": "Point"
},
"name": "ABC Logistics Vigo",
"name_address": "Aduana, 4, Rúa Concepción Arenal, Santiago de Vigo, Vigo, Pontevedra, Galicia, 36201, España",
"phone": "+34981234567",
"province": "Pontevedra",
"state": "galicia",
"street_address": "Rúa Concepción Arenal",
"street_number": "4",
"zipcode": "36201"
},
"etl_cargo_method": "back",
"etl_date": "2019-09-20T16:03:18.575Z",
"etl_extra_time": 100,
"fresh_cargo_temp": 3,
"had_etd_cargo_method": false,
"had_etl_cargo_method": false,
"hscode": "0706.10",
"is_fresh": false,
"is_imperial_measure": false,
"is_pallet": false,
"linear_meters": 0,
"pallets_num": 0,
"pallets_type": "european",
"plate_full_trailer": "string",
"service_code": "string",
"sign_image_cia": "string",
"sign_image_trucker": "string",
"signed_by_company": false,
"signed_by_company_date": "2019-09-20T16:03:18.575Z",
"signed_by_company_notify": false,
"signed_by_trucker": false,
"signed_by_trucker_date": "2019-09-20T16:03:18.575Z",
"signed_by_trucker_notify": false,
"status": "draft",
"updatedAt": "2019-09-20T16:03:18.575Z"
}
}
General Error Schema. All returned error codes will have the error code (status) and the corresponding error message. The error message will have an identifiable format as follows:
Response Headers
- application/json
- Schema
- Example (from schema)
- ETL_DATE_INVALID
Schema
Possible values: [ETL_DATE_INVALID
, ETL_ADDRESS_NOT_FOUND
, ETD_ADDRESS_NOT_FOUND
, NOT_FOUND
, NOT_ACTIVE
, SERVICE_CODE_NOT_FOUND
, AUCTION_NOT_FOUND
, DATA_NOT_VALID
, ERROR_SAVE_DELIVERY
, FORM_DATA_NOT_VALID
, FAVORITE_NOT_FOUND
, ERROR_SAVE_FAVORITE
, APIKEY_NOT_VALID
, CARGO_WEIGHT_INVALID
, CARGO_HEIGHT_INVALID
, DATE_END_INVALID
]
Default value: DATA_NOT_VALID
Possible values: [400
, 401
, 403
, 404
, 405
, 406
, 418
, 500
, 503
]
Default value: 400
{
"message": "DATA_NOT_VALID",
"status": 400
}
{
"message": "ETL_DATE_INVALID",
"status": 400
}