{"openapi":"3.1.0","paths":{"/account":{"get":{"description":"This endpoint allows a user to retrieve details about their company account","operationId":"getAccount","parameters":[],"responses":{"200":{"description":"Account details response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAccountResponseDto"}}}}},"security":[{"BearerAuth":[]}],"summary":"Retrieve account","tags":["Account"]}},"/quotes":{"post":{"description":"This endpoint allows a user to pass in shipment details and create a quote. This response will return the available rates with respective prices, and also return a quote ID that can be used in the Create Shipment endpoint.","operationId":"createQuote","parameters":[],"requestBody":{"required":true,"description":"Quote data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateQuoteRequestDto"}}}},"responses":{"201":{"description":"Created quote response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateQuoteResponseEnvelopeDto"}}}},"429":{"description":"You've created too many quotes in a short period of time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponseDto"}}}}},"security":[{"BearerAuth":[]}],"summary":"Create a quote","tags":["Quotes"],"x-readme":{"code-samples":[{"language":"shell","name":"default","code":"curl --request POST \\\n--url https://sandbox.api.mothership.com/beta/quotes \\\n--header 'accept: application/json' \\\n--header 'authorization: Bearer {YOUR_TOKEN_HERE}' \\\n--header 'content-type: application/json' \\\n--data '{\n   \"freight\": [{\n     \"quantity\": 2,\n     \"type\": \"Pallet\",\n     \"weight\": 50,\n     \"length\": 48,\n     \"width\": 42,\n     \"height\": 46,\n     \"description\": \"T-shirts\"\n   }],\n   \"pickup\": {\n     \"name\": \"Griffith Observatory\",\n     \"address\": {\n       \"street\": \"2800 E Observatory Rd\",\n       \"city\": \"Los Angeles\",\n       \"state\": \"CA\",\n       \"zip\": \"90027\"\n     },\n     \"accessorials\": [\"liftgate\"],\n     \"phoneNumber\": \"+15555555555\",\n     \"emails\": [\"logistics@mothership.com\"],\n     \"openTime\": \"1000\",\n     \"closeTime\": \"2200\"\n   },\n   \"delivery\": {\n     \"name\": \"LACMA\",\n      \"address\": {\n        \"street\": \"5905 Wilshire Blvd\",\n        \"city\": \"Los Angeles\",\n        \"state\": \"CA\",\n        \"zip\": \"90036\"\n     },\n     \"accessorials\": [\"liftgate\", \"residential\"],\n     \"phoneNumber\": \"+15555555555\",\n     \"emails\": [\"logistics@mothership.com\"],\n     \"openTime\": \"1100\",\n     \"closeTime\": \"1700\"\n   },\n   \"pickupReadyDate\": {\n     \"date\": \"2024-10-15\",\n     \"time\": \"1000\"\n   }\n }'"}]}}},"/shipments":{"post":{"description":"This endpoint allows a user to purchase and create a shipment under his/her shipper account.","operationId":"createShipment","parameters":[],"requestBody":{"required":true,"description":"Quote ID to purchase and Selected Rate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShipmentRequestDto"}}}},"responses":{"201":{"description":"Created shipment response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShipmentResponseEnvelopeDto"}}}},"429":{"description":"You've created too many shipments in a short period of time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponseDto"}}}}},"security":[{"BearerAuth":[]}],"summary":"Create a shipment","tags":["Shipments"]},"get":{"description":"This endpoint allows a user to list all shipments booked by his/her organization.","operationId":"listShipments","parameters":[{"name":"perPage","required":false,"in":"query","schema":{"type":"number","format":"number"},"description":"Maximum number of shipments returned for each page - if not provided, this will default to 25"},{"name":"page","required":false,"in":"query","schema":{"type":"number","format":"number"},"description":"Current page (for first page, use 1) - if not provided, this will default to 1"}],"responses":{"200":{"description":"Shipment details response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListShipmentsResponseEnvelopeDto"}}}}},"security":[{"BearerAuth":[]}],"summary":"List Shipments","tags":["Shipments"]}},"/shipments/{shipmentId}":{"get":{"description":"This endpoint allows a user to get up-to-date shipment details for the shipment represented by the given Shipment ID","operationId":"getShipmentDetails","parameters":[{"name":"shipmentId","required":true,"in":"path","description":"ID of the shipment to fetch details for","schema":{"type":"string","format":"string"}}],"responses":{"200":{"description":"Shipment details response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetShipmentResponseEnvelopeDto"}}}}},"security":[{"BearerAuth":[]}],"summary":"Retrieve a shipment","tags":["Shipments"]}},"/shipments/{shipmentId}/cancel":{"post":{"description":"Attempts to cancel the shipment immediately. By default, the request only succeeds when the currently available cancellation path is free. Callers can opt in to paid cancellation by setting acceptFees and optionally supplying a limitAmountCents cap.","operationId":"cancelShipment","parameters":[{"name":"shipmentId","required":true,"in":"path","description":"Reference number of the shipment to cancel","schema":{"type":"string","format":"string"}}],"requestBody":{"required":true,"description":"Cancellation request including the required reason and fee acceptance controls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelShipmentRequestDto"}}}},"responses":{"200":{"description":"Shipment cancellation completed successfully, wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelShipmentResponseEnvelopeDto"}}}},"402":{"description":"Cancellation is still possible, but the available fee exceeds what the caller accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponseDto"}}}},"409":{"description":"The shipment cannot be cancelled at this time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponseDto"}}}}},"security":[{"BearerAuth":[]}],"summary":"Cancel a shipment","tags":["Shipments"]}},"/tracking/{shipmentId}":{"get":{"description":"This endpoint allows a user to get a list of tracking events related to a shipment","operationId":"fetchShipmentTracking","parameters":[{"name":"shipmentId","required":true,"in":"path","description":"Shipment ID of the shipment to get tracking for","schema":{"type":"string","format":"string"}}],"responses":{"200":{"description":"Tracking responses are wrapped inside an array named \"results\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTrackingResponseDto"}}}}},"security":[{"BearerAuth":[]}],"summary":"Track a shipment","tags":["Tracking"]}},"/documents/{shipmentId}":{"get":{"description":"This endpoint allows a user to generate URLs directing to shipment documents like the Bill of Lading and Proof of Delivery, if available.","operationId":"listShipmentDocuments","parameters":[{"name":"shipmentId","required":true,"in":"path","description":"Shipment ID of the shipment to generate document URLs for","schema":{"type":"string","format":"string"}}],"responses":{"200":{"description":"Document details responses are wrapped inside an array named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDocumentsResponseDto"}}}}},"security":[{"BearerAuth":[]}],"summary":"List shipment documents","tags":["Documents"]}},"/files/{fileId}":{"get":{"description":"This endpoint allows you to retrieve a download url for a file by file Id","operationId":"fetchFileById","parameters":[{"name":"fileId","required":true,"in":"path","description":"File ID to generate a download url","schema":{"type":"string","format":"string"}}],"responses":{"301":{"description":"Redirects to the download url for the requested file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFileResponseDto"}}}},"400":{"description":"The given file id is not a valid Mothership file id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponseDto"}}}},"404":{"description":"No file with the given id exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponseDto"}}}}},"security":[{"BearerAuth":[]}],"summary":"Retrieve a file","tags":["Files"]}},"/invoices/modified_since":{"get":{"description":"This endpoint allows a user to pass in an ISO timestamp and receive a list of references to invoices that have either been created or modified on or after that date.","operationId":"listModifiedInvoices","parameters":[{"name":"page","required":false,"in":"query","description":"A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the nextPage value returned in a previous response to request subsequent results.","schema":{"type":"string","format":"string"}},{"name":"limit","required":false,"in":"query","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.","schema":{"type":"string","format":"string"}},{"name":"timestamp","required":true,"in":"query","description":"The ISO timestamp of the on or after date to query","schema":{"type":"string","format":"string"}}],"responses":{"200":{"description":"Response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetInvoicesModifiedSinceResponseDto"}}}}},"security":[{"BearerAuth":[]}],"summary":"List all modified invoices","tags":["Invoices"]}},"/invoices/by_shipment_id/{shipmentId}":{"get":{"description":"This endpoint allows a user to retrieve all invoices associated with a specific shipment identifier.","operationId":"listInvoicesByShipmentId","parameters":[{"name":"shipmentId","required":true,"in":"path","description":"The public shipment reference number or internal shipment UUID to query invoices for","schema":{"type":"string","format":"string"}},{"name":"page","required":false,"in":"query","description":"A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the nextPage value returned in a previous response to request subsequent results.","schema":{"type":"string","format":"string"}},{"name":"limit","required":false,"in":"query","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.","schema":{"type":"string","format":"string"}}],"responses":{"200":{"description":"Response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetInvoicesByShipmentIdResponseDto"}}}}},"security":[{"BearerAuth":[]}],"summary":"List invoices by shipment identifier","tags":["Invoices"]}},"/invoices/{invoiceId}":{"get":{"description":"This endpoint allows a user to retrieve an invoice","operationId":"fetchInvoiceById","parameters":[{"name":"invoiceId","required":true,"in":"path","description":"ID of the invoice to fetch","schema":{"type":"string","format":"string"}}],"responses":{"200":{"description":"Invoice details response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetInvoiceResponseDto"}}}}},"security":[{"BearerAuth":[]}],"summary":"Retrieve an invoice","tags":["Invoices"]}},"/webhookConfigs":{"get":{"description":"This endpoint allows a user to fetch all webhook configs set up for his/her shipper account.","operationId":"fetchWebhookConfigsForAccount","parameters":[],"responses":{"200":{"description":"Webhook config responses are wrapped inside an array named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWebhookConfigsResponseDto"}}}}},"security":[{"BearerAuth":[]}],"summary":"List webhooks","tags":["Webhooks"]},"post":{"description":"This endpoint allows a user to create a webhook config for his/her shipper account.","operationId":"createWebhookConfig","parameters":[],"requestBody":{"required":true,"description":"Data used to create a Webhook Config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookConfigRequestDto"}}}},"responses":{"201":{"description":"Created webhook config response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookConfigResponseDto"}}}}},"security":[{"BearerAuth":[]}],"summary":"Create a webhook configuration","tags":["Webhooks"]}},"/webhookConfigs/{webhookConfigId}":{"get":{"description":"This endpoint allows a user to fetch the webhook config represented by webhookConfigId.","operationId":"fetchWebhookConfig","parameters":[{"name":"webhookConfigId","required":true,"in":"path","description":"ID of the webhook config to fetch","schema":{"type":"string","format":"string"}}],"responses":{"200":{"description":"Webhook config response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWebhookConfigResponseDto"}}}},"404":{"description":"No webhook config with the given id exists for the caller organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponseDto"}}}}},"security":[{"BearerAuth":[]}],"summary":"Retrieve a webhook configuration","tags":["Webhooks"]},"put":{"description":"This endpoint allows a user to update the webhook config represented by webhookConfigId.","operationId":"updateWebhookConfig","parameters":[{"name":"webhookConfigId","required":true,"in":"path","description":"ID of the webhook config to update","schema":{"type":"string","format":"string"}}],"requestBody":{"required":true,"description":"Webhook Config data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookConfigRequestDto"}}}},"responses":{"200":{"description":"Updated webhook config response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookConfigResponseDto"}}}},"404":{"description":"No webhook config with the given id exists for the caller organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponseDto"}}}}},"security":[{"BearerAuth":[]}],"summary":"Update a webhook configuration","tags":["Webhooks"]},"delete":{"description":"This endpoint allows a user to remove the webhook config represented by webhookConfigId.","operationId":"removeWebhookConfig","parameters":[{"name":"webhookConfigId","required":true,"in":"path","description":"ID of the webhook config to remove","schema":{"type":"string","format":"string"}}],"responses":{"200":{"description":"Webhook config removed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveWebhookConfigResponseDto"}}}},"404":{"description":"No webhook config with the given id exists for the caller organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponseDto"}}}}},"security":[{"BearerAuth":[]}],"summary":"Remove a webhook configuration","tags":["Webhooks"]}}},"info":{"title":"API","description":"Open API for Mothership!","version":"0.9","contact":{"email":"developers@mothership.com"}},"tags":[{"name":"Account"},{"name":"Documents"},{"name":"Files"},{"name":"Invoices"},{"name":"Quotes"},{"name":"Shipments"},{"name":"Webhooks"}],"servers":[{"url":"https://sandbox.api.mothership.com/beta","description":"Sandbox Testing Environment"},{"url":"https://api.mothership.com/beta","description":"Production Environment"}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"QuoteAccessorial":{"type":"string","enum":["alcohol","appointment","cfs","crossDock","hazmat","homeDelivery","inside","liftgate","limitedAccess","localInsideDelivery","notifyBeforeArrival","residential","scheduledDelivery","sortSeg","tobacco","tradeshow","twicRequired"],"description":"Array of accessorials required at this location"},"QuoteAddressDto":{"type":"object","properties":{"street":{"type":"string","description":"Street of the address"},"subStreet":{"type":"string","description":"Substreet of the address, such as suite number or letter."},"city":{"type":"string","description":"City name of the address"},"state":{"type":"string","description":"2-letter state abbreviation name of the address"},"zip":{"type":"string","description":"Postal zip code of the address"}},"required":["zip"],"additionalProperties":false},"QuoteRequestLocationDto":{"type":"object","properties":{"name":{"type":"string","minLength":2,"description":"Business or company name"},"accessorials":{"type":"array","uniqueItems":true,"description":"Array of accessorials required at this location","default":[],"items":{"$ref":"#/components/schemas/QuoteAccessorial"}},"phoneNumber":{"type":"string","description":"Contact's phone number at this location in E.164 format<br><br>For example: +17148130000"},"emails":{"uniqueItems":true,"description":"Array of emails to receive notification emails","default":[],"type":"array","items":{"type":"string"}},"openTime":{"type":"string","minLength":4,"maxLength":4,"pattern":"^[0-9]{4}$","description":"Open time of this location, in 4-digit 24-hour time format (HHmm) of this location's timezone. Refraining from including minutes is a recommended best practice.<br><br>For example: 0900 to represent 9:00am in local time"},"closeTime":{"type":"string","minLength":4,"maxLength":4,"pattern":"^[0-9]{4}$","description":"Close time of this location, in 4-digit 24-hour time format (HHmm) of this location's timezone. Refraining from including minutes is a recommended best practice.<br><br>For example: 2200 to represent 10:00pm in local time"},"referenceNumber":{"type":"string","description":"Reference number set for this location"},"notes":{"type":"string","description":"Notes set for this location"},"address":{"description":"Address of this location","allOf":[{"$ref":"#/components/schemas/QuoteAddressDto"}]}},"required":["openTime","closeTime"],"additionalProperties":false},"QuoteAppointmentContactDto":{"type":"object","properties":{"email":{"type":"string","description":"Contact email to receive consignee scheduling notifications."},"phoneNumber":{"type":"string","description":"Contact phone number in E.164 format.<br><br>For example: +17148130000"}},"required":["email","phoneNumber"],"additionalProperties":false},"QuoteRequestDeliveryLocationDto":{"type":"object","properties":{"name":{"type":"string","minLength":2,"description":"Business or company name"},"accessorials":{"type":"array","uniqueItems":true,"description":"Array of accessorials required at this location","default":[],"items":{"$ref":"#/components/schemas/QuoteAccessorial"}},"phoneNumber":{"type":"string","description":"Contact's phone number at this location in E.164 format<br><br>For example: +17148130000"},"emails":{"uniqueItems":true,"description":"Array of emails to receive notification emails","default":[],"type":"array","items":{"type":"string"}},"openTime":{"type":"string","minLength":4,"maxLength":4,"pattern":"^[0-9]{4}$","description":"Open time of this location, in 4-digit 24-hour time format (HHmm) of this location's timezone. Refraining from including minutes is a recommended best practice.<br><br>For example: 0900 to represent 9:00am in local time"},"closeTime":{"type":"string","minLength":4,"maxLength":4,"pattern":"^[0-9]{4}$","description":"Close time of this location, in 4-digit 24-hour time format (HHmm) of this location's timezone. Refraining from including minutes is a recommended best practice.<br><br>For example: 2200 to represent 10:00pm in local time"},"referenceNumber":{"type":"string","description":"Reference number set for this location"},"notes":{"type":"string","description":"Notes set for this location"},"address":{"description":"Address of this location","allOf":[{"$ref":"#/components/schemas/QuoteAddressDto"}]},"appointmentContact":{"description":"Only for use with the scheduleDelivery accessorial. Alternate contact information if the consignee is not scheduling delivery.","allOf":[{"$ref":"#/components/schemas/QuoteAppointmentContactDto"}]}},"required":["openTime","closeTime"],"additionalProperties":false},"QuoteCargoType":{"type":"string","enum":["Bag","Bale","Box","Bucket","Bundle","Can","Carton","Case","Coil","Crate","Cylinder","Drum","Pail","Pallet","Pieces","Reel","Roll","Skid","Tote","Tube"],"description":"Type of this cargo. Can be: Bag, Bale, Box, Bucket, Bundle, Can, Carton, Case, Coil, Crate, Cylinder, Drum, Pail, Pallet, Pieces, Reel, Roll, Skid, Tote, or Tube.<br><br>LooseItem has been deprecated in favor of Pieces."},"QuoteFreightClass":{"type":"string","enum":["50","55","60","65","70","77.5","85","92.5","100","110","125","150","175","200","250","300","400","500"],"description":"Freight class for this line item. When provided, this is the class used to rate the shipment -- it overrides our density-based classification, so you are responsible for its accuracy and the carrier may reclassify and adjust charges if it is incorrect.<br><br>Omit this field to have the freight class calculated from the dimensions and weight you supply."},"QuotePieceType":{"type":"string","enum":["Bag","Barrel","Bolt","Box","Canister","Carton","Case","Container","Crate","Cylinder","Pieces","Roll","Tube"],"description":"Packaging of the pieces inside each handling unit. Can be: Bag, Barrel, Bolt, Box, Canister, Carton, Case, Container, Crate, Cylinder, Pieces, Roll, or Tube.<br><br>This is usually different from the cargo type: 4 pallets each holding 5 cartons is type Pallet, quantity 4, pieceType Carton, pieceCount 5."},"QuoteFreightItemDto":{"type":"object","properties":{"quantity":{"type":"number","description":"Quantity of this cargo line item","format":"float"},"type":{"$ref":"#/components/schemas/QuoteCargoType"},"weight":{"type":"integer","minimum":1,"description":"Weight (in pounds) of each item in this line item<br><br>For example, if you have a 1600 lb shipment consisting of 4 pallets at 400 lbs each, this property should be 400 lbs"},"length":{"type":"integer","minimum":1,"description":"Length (in inches) of each item in this line item"},"width":{"type":"integer","minimum":1,"description":"Width (in inches) of each item in this line item"},"height":{"type":"integer","minimum":1,"description":"Height (in inches) of each item in this line item"},"description":{"type":"string","description":"Cargo description of this line item"},"nmfcCode":{"type":"string","pattern":"^\\d{3,10}(?:-\\d{1,3})?$","description":"NMFC code for this line item, as a 3-10 digit article number with an optional 1-3 digit sub-item suffix.<br><br>For example: 156600 or 156600-03"},"freightClass":{"allOf":[{"$ref":"#/components/schemas/QuoteFreightClass"}]},"pieceCount":{"type":"integer","minimum":1,"description":"Number of pieces inside each handling unit, printed on the bill of lading<br><br>For example, if you have 4 pallets each holding 5 cartons, this property should be 5 and quantity should be 4"},"pieceType":{"allOf":[{"$ref":"#/components/schemas/QuotePieceType"}]}},"required":["quantity","type","weight","length","width","height"],"additionalProperties":false},"CreateQuoteRequestDto":{"type":"object","properties":{"pickup":{"description":"Object containing pickup (shipper) location information. Must contain an address object.","allOf":[{"$ref":"#/components/schemas/QuoteRequestLocationDto"}]},"delivery":{"description":"Object containing delivery (consignee) location information. Must contain an address object.","allOf":[{"$ref":"#/components/schemas/QuoteRequestDeliveryLocationDto"}]},"rateResponseTimeoutMs":{"type":"number","minimum":5000,"description":"Timeout (in milliseconds) for rates to be returned. Default is 25000ms. Some carriers take longer than others to return rates, so a lower rateResponseTimeoutMs may result in fewer rates being returned. Certain platforms, like Shopify, have a strict timeout time, so a lower rateResponseTimeoutMs may be necessary for your use-case. Use with caution.\n - If you are unsure, leave this field blank.\n - If you are experiencing issues with rates not being returned, you may want to increase this value.\n - This value is the time taken to retrieve the rate. If you have a hard limit on the time to wait for a response, you should set a timeout on the request itself.\nNOTE - If set, the minimum value is 5000ms (5 seconds)","default":25000,"format":"float"},"freight":{"minItems":1,"description":"Array of freight information. Each array element represents a different line item of freight","type":"array","items":{"$ref":"#/components/schemas/QuoteFreightItemDto"}},"pickupReadyDate":{"description":"Date and time of day that this shipment will be ready to be picked up. Object consisting of `date` and `time` where `date` has a format of \"YYYY-MM-DD\" and `time` has a 24-hour time format, such as \"0900\".<br>For example: {\"date\": \"2024-01-30\", \"time\": \"0900\"}","anyOf":[{"type":"string","format":"date-time","description":"Deprecated. ISOString in UTC.","deprecated":true},{"type":"object","properties":{"date":{"type":"string","pattern":"^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$"},"time":{"type":"string","pattern":"^[0-9]{4}$","minLength":4,"maxLength":4}},"required":["date","time"],"additionalProperties":false}]},"applyAvailableCredits":{"type":"boolean","description":"If false, will not apply any available credits on the shipper account to this quote","default":true},"declaredFreightValue":{"type":"integer","minimum":101,"maximum":250000,"description":"Declared freight value in USD. This adds Freight Protect to your quote; you do not have to pass this value if you want to rely on the carrier's default insurance coverage."}},"required":["pickup","delivery","freight","pickupReadyDate"],"additionalProperties":false},"PublicApiErrorType":{"type":"string","enum":["UNKNOWN","NOT_FOUND","SERVER_ERROR","UNAUTHENTICATED","MISSING_PERMISSION","INVALID_REQUEST","RATE_LIMIT_EXCEEDED","CARGO_TOO_LARGE","NO_RATES_FOUND","QUOTE_NOT_PURCHASABLE","PAYMENT_REQUIRED","PAYMENT_FAILED"]},"PublicApiErrorDataDto":{"type":"object","properties":{"code":{"type":"number","enum":[100,101,200,201,202,203,204,205,206,300,301,302,303,304,305,307,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,422,429,500,501,502,503,504,505],"format":"float"},"type":{"allOf":[{"$ref":"#/components/schemas/PublicApiErrorType"}]},"message":{"type":"string"},"metadata":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","type","message"],"additionalProperties":false},"PublicApiErrorResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PublicApiErrorDataDto"}},"required":["data"],"additionalProperties":false},"CreateShipmentRequestDto":{"type":"object","properties":{"quoteId":{"type":"string","description":"Quote ID, acquired from the Create Quote endpoint, to purchase and convert into a shipment"},"rateId":{"type":"string","description":"Represents the ID of the desired rate to purchase, which must be any one of the returned rates in the quote object corresponding with the given quoteId"}},"required":["quoteId","rateId"],"additionalProperties":false},"PublicShipmentCancellationReason":{"type":"string","enum":["CargoNotReady","ShipmentCorrectionsNeeded","IncorrectCargoInfo","MissingAccessorial","ShipmentNotNeeded"],"description":"Reason for cancellation."},"CancelShipmentRequestDto":{"type":"object","properties":{"reason":{"description":"Reason for cancellation.","allOf":[{"$ref":"#/components/schemas/PublicShipmentCancellationReason"}]},"acceptFees":{"type":"boolean","description":"When true, cancel the shipment even if the currently available cancellation path has a fee. Defaults to false.","default":false},"limitAmountCents":{"type":"integer","minimum":0,"description":"Optional maximum fee, in cents, that the caller is willing to pay when acceptFees is true."}},"required":["reason"],"additionalProperties":false},"WebhookEventType":{"type":"string","enum":["billOfLading.created","billOfLading.updated","proofOfDelivery.created","proofOfDelivery.updated","deliveryReceipt.created","deliveryReceipt.updated","certificateOfInsurance.created","shipment.purchased","shipment.status.updated"],"description":"Array of events that will trigger a webhook event"},"CreateWebhookConfigRequestDto":{"type":"object","properties":{"webhookUrl":{"type":"string","description":"URL that Mothership's server will POST webhook events to"},"subscribedEvents":{"type":"array","description":"Array of events that will trigger a webhook event","items":{"$ref":"#/components/schemas/WebhookEventType"}}},"required":["webhookUrl","subscribedEvents"],"additionalProperties":false},"UpdateWebhookConfigRequestDto":{"type":"object","properties":{"subscribedEvents":{"type":"array","description":"Array of events that will trigger a webhook event","items":{"$ref":"#/components/schemas/WebhookEventType"}},"webhookUrl":{"type":"string","description":"URL that Mothership's server will POST webhook events to"}},"additionalProperties":false},"AccountDto":{"type":"object","properties":{"id":{"type":"string","description":"The ID of your company account"},"createdAt":{"type":"string","description":"ISO string of when the company account was first created"},"updatedAt":{"type":"string","description":"ISO string of when the company account was last updated"},"name":{"type":"string","description":"The name of your company account"},"email":{"type":"string","description":"The primary email of your company account"},"phoneNumber":{"type":"string","description":"The primary phone number of your company account"},"paymentTermsEnabled":{"type":"boolean","description":"Whether payment terms are enabled for the account"},"paymentTermLengthDays":{"type":"number","description":"The number of days from invoice to payment due","format":"float"},"creditLimitAmount":{"type":"number","description":"The total amount of term credit in USD","format":"float"},"availableCreditAmount":{"type":"number","description":"The amount in USD remaining due on the credit term","format":"float"},"totalAmountDue":{"type":"number","description":"The total amount due in USD of unpaid invoices","format":"float"},"currency":{"type":"string","description":"Three-letter ISO currency code, in lowercase"}},"required":["id","createdAt","name","email","phoneNumber","paymentTermLengthDays"],"additionalProperties":false},"GetAccountResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AccountDto"}},"required":["data"],"additionalProperties":false},"PublicDocumentType":{"type":"string","enum":["billOfLading","certificateOfInsurance","deliveryReceipt","proofOfDelivery"],"description":"Type of document"},"ShipmentDocumentDto":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/PublicDocumentType"},"url":{"type":"string","description":"URL directing to the document"},"expiresAt":{"type":"string","format":"date-time","description":"ISOString representing the datetime of when the document URL will expire"}},"required":["type","url","expiresAt"],"additionalProperties":false},"GetDocumentsResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ShipmentDocumentDto"}}},"required":["data"],"additionalProperties":false},"GetFileDataDto":{"type":"object","properties":{"url":{"type":"string","description":"Redirect to presigned url for file id"}},"required":["url"],"additionalProperties":false},"GetFileResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GetFileDataDto"}},"required":["data"],"additionalProperties":false},"InvoiceCreditDto":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the credit"},"createdAt":{"type":"string","description":"ISO string of when the credit was applied"},"amount":{"type":"number","description":"The amount (in cents) of the credit in USD","format":"float"}},"required":["id","createdAt","amount"],"additionalProperties":false},"InvoicePaymentDto":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the payment"},"createdAt":{"type":"string","description":"ISO string of when the payment was applied"},"amount":{"type":"number","description":"The amount (in cents) of the payment in USD","format":"float"}},"required":["id","createdAt","amount"],"additionalProperties":false},"InvoiceLineItemType":{"type":"string","description":"The type of line item","enum":["additional","base-shipment","booking-fee","cancellation-fee","claim","credit-card-processor-fee","cross-dock","freight-coverage","fuel-surcharge","fba-appointment-delivery","home-delivery","late-fee","local-inside-delivery","oversize-fee","residential-delivery","residential-pickup","revenue-share-adjustment","scheduled-delivery","scheduled-pickup","toll-fee","twic-charge","appointment-delivery","international-transaction-fee","domestic-credit-card-processing-fee","international-credit-card-processing-fee","cross-border-transaction-fee","financing-fee","dispute-fee","digital-wallet-processing-fee"]},"InvoiceLineItemDto":{"type":"object","properties":{"quantity":{"type":"number","description":"The quantity for this line item","format":"float"},"type":{"$ref":"#/components/schemas/InvoiceLineItemType"},"unitAmountCents":{"type":"number","description":"The unit amount in cents for this line item","format":"float"},"totalAmountCents":{"type":"number","description":"The total amount in cents for this line item","format":"float"},"discountAmountCents":{"type":"number","description":"The discount amount in cents for this line item","format":"float"},"taxAmountCents":{"type":"number","description":"The tax amount in cents for this line item","format":"float"},"description":{"type":"string","description":"A human-readable description of the line item"}},"required":["quantity","type","unitAmountCents","totalAmountCents","discountAmountCents","taxAmountCents","description"],"additionalProperties":false},"InvoiceStatus":{"type":"string","description":"The status of the invoice","enum":["open","paid","unpaid","pastDue","void"]},"InvoiceEntityType":{"type":"string","description":"The invoiceable entity type, most commonly 'shipment'. Payment processing fee invoices use 'payment'.","enum":["shipment","claim","statement","payment"]},"InvoiceDto":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the invoice"},"createdAt":{"type":"string","description":"ISO string of when the invoice was first created"},"updatedAt":{"type":"string","description":"ISO string of when the invoice was last updated"},"dueDate":{"type":"string","description":"ISO string of when the invoice is required to be paid by"},"total":{"type":"number","description":"The total amount (in cents) of the invoice in USD","format":"float"},"amountDue":{"type":"number","description":"The amount (in cents) in USD remaining due on the invoice","format":"float"},"credits":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceCreditDto"},"description":"The credits applied to the invoice"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceLineItemDto"},"description":"The individual line items that make up the invoice"},"payments":{"type":"array","items":{"$ref":"#/components/schemas/InvoicePaymentDto"},"description":"The payments applied to the invoice"},"currency":{"type":"string","description":"Three-letter ISO currency code, in lowercase. Defaulted to 'usd'."},"status":{"$ref":"#/components/schemas/InvoiceStatus"},"referenceNumber":{"type":"string","description":"The reference number of the invoice. This is not guaranteed to be unique, nor to match the reference number of its owning entity type"},"description":{"type":"string","description":"The description of the invoice"},"entityType":{"$ref":"#/components/schemas/InvoiceEntityType"},"entityId":{"type":"string","description":"The invoiceable entity id. For shipments, the shipment reference number when available; for payment processing fee invoices, the finance payment UUID."}},"required":["id","createdAt","updatedAt","lineItems","status","referenceNumber","description","entityType","entityId"],"additionalProperties":false},"GetInvoiceResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/InvoiceDto"}},"required":["data"],"additionalProperties":false},"InvoiceModifiedSinceDto":{"type":"object","properties":{"id":{"type":"string","description":"Invoice ID"},"lastModifiedAt":{"type":"string","description":"The most recent timestamp the invoice was modified at."}},"required":["id","lastModifiedAt"],"additionalProperties":false},"InvoiceListPageDto":{"type":"object","properties":{"invoices":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceModifiedSinceDto"}},"hasMore":{"type":"boolean","description":"True if there are more records to fetch."},"total":{"type":"number","description":"The total number of invoices that are modified on or after the date.","format":"float"},"limit":{"type":"number","description":"The number of results requested in this page, not necessarily the number of results returned if on the last page.","format":"float"},"currentPage":{"type":"number","description":"The index of the current page of results returned.","format":"float"},"nextPage":{"nullable":true,"type":"number","description":"The index of the next page of results to fetch, if available.","format":"float"}},"required":["invoices","hasMore"],"additionalProperties":false},"GetInvoicesModifiedSinceResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/InvoiceListPageDto"}},"required":["data"],"additionalProperties":false},"GetInvoicesByShipmentIdResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/InvoiceListPageDto"}},"required":["data"],"additionalProperties":false},"TruckEquipment":{"type":"string","enum":["any","straightTruck","tractor"]},"TruckSpecialty":{"type":"string","enum":["reefer","flatbed","dryVan"]},"RateTruckDto":{"type":"object","properties":{"equipment":{"$ref":"#/components/schemas/TruckEquipment"},"specialty":{"$ref":"#/components/schemas/TruckSpecialty"}},"required":["equipment","specialty"],"additionalProperties":false},"RateService":{"type":"string","description":"Services included with this rate","enum":["dedicated","teamDrive","custom","standard","guaranteed","guaranteed08","guaranteed09","guaranteed10","guaranteed11","guaranteed12","guaranteed14","guaranteed15","guaranteed1530","expedited","expedited12","expedited17","accelerated","guaranteedWithinWindow","guaranteedMultiHourWindow","guaranteedSingleHourWindow","capacityLoad","unknown"]},"RateServiceType":{"type":"string","description":"Service type is deprecated in favor of services. Please use those instead. This will often be returned as \"other\"","enum":["nextDay","sameDay","customRate","limitedAccessRegional","lowest","bestValue","fastest","flatbed","reefer","other"]},"RateWarning":{"type":"string","description":"Warning associated with this rate","enum":["consolidator"]},"RateProvider":{"type":"string","description":"The shipping provider for this rate","enum":["mothership","abf","centralTransport","customCompanies","daylight","echoGlobalLogistics","forwardAir","frontline","oldDominion","roadrunner","saia","southeastern","tforce","ups","ward","xpo","conway","partner"]},"RateProviderScac":{"type":"string","description":"The shipping provider for this rate","enum":["mhpg","abfs","ctii","ctbv","dylt","echs","fwdn","fcsy","odfl","rdfs","saia","sefl","tfin","upgf","ward","xpol","cnwy","partner"]},"RateTransitDaysDto":{"type":"object","properties":{"minimum":{"type":"number","minimum":0,"format":"float"},"maximum":{"type":"number","minimum":0,"format":"float"}},"required":["minimum","maximum"],"additionalProperties":false},"RateDto":{"type":"object","properties":{"id":{"type":"string"},"price":{"type":"number","description":"Price, in USD, of the rate","format":"float"},"transitDays":{"description":"Range number of transit days","allOf":[{"$ref":"#/components/schemas/RateTransitDaysDto"}]},"estimatedPickupDate":{"type":"string","format":"date-time","description":"ISOString representing the estimated earliest datetime that this shipment would be picked up at"},"estimatedDeliveryDate":{"type":"string","format":"date-time","description":"ISOString representing the estimated latest datetime that this shipment would be delivered at"},"provider":{"$ref":"#/components/schemas/RateProvider"},"providerScac":{"$ref":"#/components/schemas/RateProviderScac"},"truck":{"description":"Truck is deprecated. This is the truck equipment and specialty for this rate. This is often unknown at purchase time, so it should be ignored.","deprecated":true,"allOf":[{"$ref":"#/components/schemas/RateTruckDto"}]},"services":{"type":"array","items":{"$ref":"#/components/schemas/RateService"},"description":"List of services associated with this rate","default":[]},"serviceType":{"deprecated":true,"allOf":[{"$ref":"#/components/schemas/RateServiceType"}]},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/RateWarning"},"description":"List of warnings associated with this rate","default":[]},"creditsApplied":{"type":"number","description":"Dollars of credit applied towards this rate","format":"float"},"coveragePrice":{"type":"number","description":"Price of the insurance coverage in USD","format":"float"},"coveredValue":{"type":"integer","description":"Freight's value covered by insurance in USD"}},"required":["id","price","transitDays","estimatedPickupDate","estimatedDeliveryDate","provider","providerScac","services","warnings","creditsApplied","coveragePrice","coveredValue"],"additionalProperties":false},"QuoteResponseLocationDto":{"type":"object","properties":{"name":{"type":"string","description":"Business or company name"},"street":{"type":"string","description":"Street of the address"},"subStreet":{"type":"string","description":"Substreet of the address, such as suite number or letter. Deprecated - please provide this in the address field.","deprecated":true},"city":{"type":"string","description":"City name of the address"},"state":{"type":"string","description":"2-letter state abbreviation name of the address"},"zip":{"type":"string","description":"Postal zip code of the address"},"placeId":{"type":"string","description":"Deprecated -- please use address parameter instead. Place ID acquired from the Fetch Places endpoint.","deprecated":true},"accessorials":{"type":"array","items":{"$ref":"#/components/schemas/QuoteAccessorial"},"uniqueItems":true,"description":"Array of accessorials required at this location","default":[]},"phoneNumber":{"type":"string","description":"Contact's phone number at this location in E.164 format<br><br>For example: +17148130000"},"emails":{"type":"array","items":{"type":"string"},"uniqueItems":true,"description":"Array of emails to receive notification emails","default":[]},"openTime":{"type":"string","minLength":4,"maxLength":4,"pattern":"^[0-9]{4}$","description":"Open time of this location, in 4-digit 24-hour time format (HHmm) of this location's timezone. Refraining from including minutes is a recommended best practice.<br><br>For example: 0900 to represent 9:00am in local time"},"closeTime":{"type":"string","minLength":4,"maxLength":4,"pattern":"^[0-9]{4}$","description":"Close time of this location, in 4-digit 24-hour time format (HHmm) of this location's timezone. Refraining from including minutes is a recommended best practice.<br><br>For example: 2200 to represent 10:00pm in local time"},"referenceNumber":{"type":"string","description":"Reference number set for this location"},"notes":{"type":"string","description":"Notes set for this location"},"timezone":{"type":"string","description":"IANA timezone name of the location (e.g. America/Los_Angeles), usable to convert the location's open/close times to local time"}},"required":["state","zip","placeId","accessorials","emails","openTime","closeTime"],"additionalProperties":false},"QuoteInvalidFieldDto":{"type":"object","properties":{"field":{"type":"string"},"errorMessage":{"type":"string"}},"required":["errorMessage"],"additionalProperties":false},"QuoteResponseMetadataDto":{"type":"object","properties":{"purchasable":{"type":"boolean","description":"If true, the returned Quote ID can be used in the Create Shipment endpoint. If false, more properties (detailed in the invalidFieldsRequiredForPurchase property) must be included in this Create Quote call before the returned Quote ID can be used in the Create Shipment endpoint"},"invalidFieldsRequiredForPurchase":{"type":"array","items":{"$ref":"#/components/schemas/QuoteInvalidFieldDto"},"description":"Array of fields that still need to be provided in this endpoint before the given Quote ID can be used in the Create Shipment endpoint","default":[]},"pickupLocationSuggestedAccessorials":{"type":"array","items":{"$ref":"#/components/schemas/QuoteAccessorial"},"uniqueItems":true,"description":"Array of accessorials suggested at pickup location","default":[]},"deliveryLocationSuggestedAccessorials":{"type":"array","items":{"$ref":"#/components/schemas/QuoteAccessorial"},"uniqueItems":true,"description":"Array of accessorials suggested at delivery location","default":[]}},"required":["purchasable","invalidFieldsRequiredForPurchase","pickupLocationSuggestedAccessorials","deliveryLocationSuggestedAccessorials"],"additionalProperties":false},"CreateQuoteResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Quote ID, which can be used in the Create Shipment Endpoint"},"expiresAt":{"type":"string","format":"date-time","description":"ISOString representing when this quote expires and can no longer be used in the Create Shipment endpoint"},"rates":{"type":"array","items":{"$ref":"#/components/schemas/RateDto"},"minItems":1,"description":"Array of available rates that can be purchased. Desired rate should be passed into the Create Shipment endpoint with the Quote ID"},"freight":{"type":"array","items":{"$ref":"#/components/schemas/QuoteFreightItemDto"},"minItems":1,"description":"Array of freight information. Each array element represents a different line item of freight"},"pickup":{"$ref":"#/components/schemas/QuoteResponseLocationDto"},"delivery":{"$ref":"#/components/schemas/QuoteResponseLocationDto"},"metadata":{"$ref":"#/components/schemas/QuoteResponseMetadataDto"}},"required":["id","expiresAt","rates","freight","pickup","delivery","metadata"],"additionalProperties":false},"CreateQuoteResponseEnvelopeDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CreateQuoteResponseDto"}},"required":["data"],"additionalProperties":false},"PublicShipmentFreightItemDto":{"type":"object","properties":{"quantity":{"type":"number","description":"Quantity of this cargo line item","format":"float"},"type":{"$ref":"#/components/schemas/QuoteCargoType"},"weight":{"type":"integer","minimum":1,"description":"Weight (in pounds) of each item in this line item<br><br>For example, if you have a 1600 lb shipment consisting of 4 pallets at 400 lbs each, this property should be 400 lbs"},"length":{"type":"integer","minimum":1,"description":"Length (in inches) of each item in this line item"},"width":{"type":"integer","minimum":1,"description":"Width (in inches) of each item in this line item"},"height":{"type":"integer","minimum":1,"description":"Height (in inches) of each item in this line item"},"description":{"type":"string","description":"Cargo description of this line item"},"nmfcCode":{"type":"string","pattern":"^\\d{3,10}(?:-\\d{1,3})?$","description":"NMFC code for this line item, as a 3-10 digit article number with an optional 1-3 digit sub-item suffix.<br><br>For example: 156600 or 156600-03"},"freightClass":{"allOf":[{"$ref":"#/components/schemas/QuoteFreightClass"}]},"pieceCount":{"type":"integer","minimum":1,"description":"Number of pieces inside each handling unit, printed on the bill of lading<br><br>For example, if you have 4 pallets each holding 5 cartons, this property should be 5 and quantity should be 4"},"pieceType":{"allOf":[{"$ref":"#/components/schemas/QuotePieceType"}]}},"required":["quantity","type","weight","length","width","height"],"additionalProperties":false},"PublicShipmentLocationDto":{"type":"object","properties":{"name":{"type":"string","description":"Business or company name"},"street":{"type":"string","description":"Street of the address"},"subStreet":{"type":"string","description":"Substreet of the address, such as suite number or letter. Deprecated - please provide this in the address field.","deprecated":true},"city":{"type":"string","description":"City name of the address"},"state":{"type":"string","description":"2-letter state abbreviation name of the address"},"zip":{"type":"string","description":"Postal zip code of the address"},"timezone":{"type":"string","description":"IANA timezone name of the location (e.g. America/Los_Angeles), usable to convert the location's open/close times and the shipment's UTC timestamps to local time"},"placeId":{"type":"string","description":"Deprecated -- please use address parameter instead. Place ID acquired from the Fetch Places endpoint.","deprecated":true},"accessorials":{"type":"array","items":{"$ref":"#/components/schemas/QuoteAccessorial"},"uniqueItems":true,"description":"Array of accessorials required at this location","default":[]},"phoneNumber":{"type":"string","description":"Contact's phone number at this location in E.164 format<br><br>For example: +17148130000"},"emails":{"type":"array","items":{"type":"string"},"uniqueItems":true,"description":"Array of emails to receive notification emails","default":[]},"openTime":{"type":"string","minLength":4,"maxLength":4,"pattern":"^[0-9]{4}$","description":"Open time of this location, in 4-digit 24-hour time format (HHmm) of this location's timezone. Refraining from including minutes is a recommended best practice.<br><br>For example: 0900 to represent 9:00am in local time"},"closeTime":{"type":"string","minLength":4,"maxLength":4,"pattern":"^[0-9]{4}$","description":"Close time of this location, in 4-digit 24-hour time format (HHmm) of this location's timezone. Refraining from including minutes is a recommended best practice.<br><br>For example: 2200 to represent 10:00pm in local time"},"referenceNumber":{"type":"string","description":"Reference number set for this location"},"notes":{"type":"string","description":"Notes set for this location"}},"required":["city","state","zip","placeId","accessorials","emails","openTime","closeTime"],"additionalProperties":false},"PublicShipmentSummaryDto":{"type":"object","properties":{"id":{"type":"string","description":"ID of the created shipment"},"createdAt":{"type":"string","format":"date-time","description":"ISOString representing the datetime of when the shipment was created"},"status":{"type":"string","description":"Current status of the shipment"},"price":{"type":"number","description":"Price paid, in USD, for the shipment","format":"float"},"earliestPickupDate":{"type":"string","format":"date-time","description":"ISOString representing the earliest datetime that this shipment would be picked up at"},"estimatedDeliveryDate":{"type":"string","format":"date-time","description":"ISOString representing the estimated latest datetime that this shipment would be delivered at"},"freight":{"type":"array","items":{"$ref":"#/components/schemas/PublicShipmentFreightItemDto"},"minItems":1,"description":"Array of freight information. Each array element represents a different line item of freight"},"pickup":{"description":"Pickup location of the shipment","allOf":[{"$ref":"#/components/schemas/PublicShipmentLocationDto"}]},"delivery":{"description":"Delivery location of the shipment","allOf":[{"$ref":"#/components/schemas/PublicShipmentLocationDto"}]},"trackingUrl":{"type":"string","description":"Tracking url for the shipment"}},"required":["id","createdAt","price","earliestPickupDate","estimatedDeliveryDate","freight","pickup","delivery"],"additionalProperties":false},"PublicShipmentEstimatedLocationDto":{"type":"object","properties":{"latitude":{"type":"number","description":"The latitude of the shipment's last estimated location.","format":"float"},"longitude":{"type":"number","description":"The longitude of the shipment's last estimated location.","format":"float"}},"required":["latitude","longitude"],"additionalProperties":false},"PublicShipmentPartnerDto":{"type":"object","properties":{"name":{"type":"string","description":"The name of the shipment's partner carrier."},"pickupNumber":{"type":"string","description":"The pickup number associated with the partner shipment."},"proNumber":{"type":"string","description":"The pro number associated with the partner shipment."}},"required":["name"],"additionalProperties":false},"PublicShipmentDetailsDto":{"type":"object","properties":{"id":{"type":"string","description":"ID of the created shipment"},"createdAt":{"type":"string","format":"date-time","description":"ISOString representing the datetime of when the shipment was created"},"status":{"type":"string","description":"Current status of the shipment"},"price":{"type":"number","description":"Price paid, in USD, for the shipment","format":"float"},"earliestPickupDate":{"type":"string","format":"date-time","description":"ISOString representing the earliest datetime that this shipment would be picked up at"},"estimatedDeliveryDate":{"type":"string","format":"date-time","description":"ISOString representing the estimated latest datetime that this shipment would be delivered at"},"freight":{"type":"array","items":{"$ref":"#/components/schemas/PublicShipmentFreightItemDto"},"minItems":1,"description":"Array of freight information. Each array element represents a different line item of freight"},"pickup":{"description":"Pickup location of the shipment","allOf":[{"$ref":"#/components/schemas/PublicShipmentLocationDto"}]},"delivery":{"description":"Delivery location of the shipment","allOf":[{"$ref":"#/components/schemas/PublicShipmentLocationDto"}]},"trackingUrl":{"type":"string","description":"Tracking url for the shipment"},"estimatedLocation":{"description":"The shipment's last estimated location.","allOf":[{"$ref":"#/components/schemas/PublicShipmentEstimatedLocationDto"}]},"partner":{"description":"The shipment's partner carrier.","allOf":[{"$ref":"#/components/schemas/PublicShipmentPartnerDto"}]}},"required":["id","createdAt","price","earliestPickupDate","estimatedDeliveryDate","freight","pickup","delivery"],"additionalProperties":false},"CreateShipmentResponseEnvelopeDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PublicShipmentSummaryDto"}},"required":["data"],"additionalProperties":false},"GetShipmentResponseEnvelopeDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PublicShipmentDetailsDto"}},"required":["data"],"additionalProperties":false},"ListShipmentsPageDto":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/PublicShipmentSummaryDto"}},"perPage":{"type":"number","description":"Maximum number of shipments returned for each page","format":"float"},"page":{"type":"number","description":"Current page of shipments","format":"float"},"hasMore":{"type":"boolean","description":"True if more shipments can be fetched from a subsequent page"}},"required":["perPage","page","hasMore"],"additionalProperties":false},"ListShipmentsResponseEnvelopeDto":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/ListShipmentsPageDto"}]}},"additionalProperties":false},"PublicShipmentCancellationStatus":{"type":"string","enum":["cancelled"],"description":"Whether the cancellation completed successfully"},"CancelShipmentResponseDataDto":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/PublicShipmentCancellationStatus"},"cancellationFeeCents":{"type":"integer","minimum":0,"description":"Fee in cents associated with the completed cancellation"}},"required":["status","cancellationFeeCents"],"additionalProperties":false},"CancelShipmentResponseEnvelopeDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CancelShipmentResponseDataDto"}},"required":["data"],"additionalProperties":false},"TrackingEventDto":{"type":"object","properties":{"city":{"type":"string","description":"City in which the shipment is currently residing"},"state":{"type":"string","description":"State in which the shipment is currently residing"},"deliveryLocationName":{"type":"string","description":"Name of the location the shipment is being delivered to, when one is recorded"},"pickupLocationName":{"type":"string","description":"Name of the location the shipment is being picked up from, when one is recorded"},"eventType":{"type":"string","description":"Type of tracking event"},"shipmentReferenceNumber":{"type":"string","description":"Reference number that identifies the shipment"},"proNumber":{"type":"string","description":"Pro number for the shipment, if one is available from the provider"},"timestamp":{"type":"string","description":"ISO string of when the tracking event took place"},"status":{"type":"string","description":"New status of the shipment, or a description of how the shipment is progressing from an integrated carrier"},"description":{"type":"string","description":"Carrier-supplied description of the shipment's progress, when the integrated carrier provides one"},"timezone":{"type":"string","description":"IANA timezone name where the event took place (e.g. America/Los_Angeles), usable to convert the UTC timestamp to local time"}},"required":["eventType","shipmentReferenceNumber","timestamp"],"additionalProperties":false},"TrackingResultsDto":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/TrackingEventDto"}}},"required":["results"],"additionalProperties":false},"GetTrackingResponseDto":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/TrackingResultsDto"}]}},"additionalProperties":false},"WebhookConfigStatus":{"type":"string","enum":["active","inactive"],"description":"Current status of the webhook config"},"WebhookConfigModel":{"type":"object","properties":{"id":{"type":"string","description":"ID of the webhook config"},"createdAt":{"type":"string","format":"date-time","description":"ISOString representing the datetime that this webhook config was created"},"status":{"$ref":"#/components/schemas/WebhookConfigStatus"},"subscribedEvents":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventType"},"description":"Array of events that will trigger a webhook event"},"webhookUrl":{"type":"string","description":"URL that Mothership's server will POST webhook events to"}},"required":["id","createdAt","status","subscribedEvents","webhookUrl"],"additionalProperties":false},"WebhookConfigWithSecretModel":{"type":"object","properties":{"id":{"type":"string","description":"ID of the webhook config"},"createdAt":{"type":"string","format":"date-time","description":"ISOString representing the datetime that this webhook config was created"},"status":{"$ref":"#/components/schemas/WebhookConfigStatus"},"subscribedEvents":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventType"},"description":"Array of events that will trigger a webhook event"},"webhookUrl":{"type":"string","description":"URL that Mothership's server will POST webhook events to"},"secretKey":{"type":"string","description":"Secret key specific to this token record that can be used to validate incoming webhook payloads"}},"required":["id","createdAt","status","subscribedEvents","webhookUrl","secretKey"],"additionalProperties":false},"GetWebhookConfigsResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookConfigModel"}}},"required":["data"],"additionalProperties":false},"CreateWebhookConfigResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookConfigWithSecretModel"}},"required":["data"],"additionalProperties":false},"GetWebhookConfigResponseDto":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/WebhookConfigWithSecretModel"}]}},"additionalProperties":false},"UpdateWebhookConfigResponseDto":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/WebhookConfigModel"}]}},"additionalProperties":false},"RemoveWebhookConfigResponseDto":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false}}},"security":[{"BearerAuth":[]}],"x-explorer-enabled":true,"x-samples-languages":["curl","node","python","go","java","php"]}