{"openapi":"3.0.0","info":{"description":"Open API for Mothership!","title":"API","version":"0.9","contact":{"email":"developers@mothership.com"}},"servers":[{"url":"https://sandbox.api.mothership.com/beta","description":"Sandbox Testing Environment"},{"url":"https://api.mothership.com/beta","description":"Production Environment"}],"tags":[{"name":"Account"},{"name":"Documents"},{"name":"Files"},{"name":"Invoices"},{"name":"Quotes"},{"name":"Shipments"},{"name":"Webhooks"}],"security":[{"BearerAuth":[]}],"x-explorer-enabled":true,"x-samples-languages":["curl","node","python","go","java","php"],"components":{"schemas":{"GetDocumentsResponseSchema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["billOfLading","certificateOfInsurance","deliveryReceipt","proofOfDelivery"],"description":"Type of document"},"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}}},"required":["data"],"additionalProperties":false},"GetPlaceResponseSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Place ID of the address"},"city":{"type":"string","description":"City name of the address"},"street":{"type":"string","description":"Street address of the address"},"state":{"type":"string","minLength":2,"maxLength":2,"description":"2-letter state abbrevation of the address"},"zip":{"type":"string","description":"Postal zip code of the address"}},"required":["id","zip"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"GetPlacesResponseSchema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Place ID of the address"},"city":{"type":"string","description":"City name of the address"},"street":{"type":"string","description":"Street address of the address"},"state":{"type":"string","minLength":2,"maxLength":2,"description":"2-letter state abbrevation of the address"},"zip":{"type":"string","description":"Postal zip code of the address"}},"required":["id","zip"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false},"CreateQuoteRequestSchema":{"type":"object","properties":{"pickup":{"type":"object","properties":{"subStreet":{"type":"string","description":"Substreet of the address, such as suite number or letter. Deprecated - please provide this in the address field.","deprecated":true},"accessorials":{"type":"array","items":{"type":"string","enum":["alcohol","appointment","cfs","crossDock","hazmat","homeDelivery","inside","liftgate","limitedAccess","localInsideDelivery","residential","scheduledDelivery","sortSeg","tobacco","tradeshow","twicRequired"]},"uniqueItems":true,"default":[],"description":"Array of accessorials required at this location"},"emails":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[],"description":"Array of emails to receive notification emails"},"openTime":{"type":"string","pattern":"[0-9]+","minLength":4,"maxLength":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","pattern":"[0-9]+","minLength":4,"maxLength":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"},"name":{"type":"string","minLength":2,"description":"Business or company name"},"phoneNumber":{"type":"string","description":"Contacts phone number at this location in .e164 format<br><br>For example: +17148130000"},"placeId":{"type":"string","description":"Deprecated -- please use address parameter instead. Place ID acquired from the Fetch Places endpoint.","deprecated":true},"address":{"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}},"required":["openTime","closeTime"],"additionalProperties":false,"description":"Object containing pickup (shipper) location information. Must contain either placeId or address."},"delivery":{"type":"object","properties":{"subStreet":{"type":"string","description":"Substreet of the address, such as suite number or letter. Deprecated - please provide this in the address field.","deprecated":true},"accessorials":{"type":"array","items":{"type":"string","enum":["alcohol","appointment","cfs","crossDock","hazmat","homeDelivery","inside","liftgate","limitedAccess","localInsideDelivery","residential","scheduledDelivery","sortSeg","tobacco","tradeshow","twicRequired"]},"uniqueItems":true,"default":[],"description":"Array of accessorials required at this location"},"emails":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[],"description":"Array of emails to receive notification emails"},"openTime":{"type":"string","pattern":"[0-9]+","minLength":4,"maxLength":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","pattern":"[0-9]+","minLength":4,"maxLength":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"},"name":{"type":"string","minLength":2,"description":"Business or company name"},"phoneNumber":{"type":"string","description":"Contacts phone number at this location in .e164 format<br><br>For example: +17148130000"},"placeId":{"type":"string","description":"Deprecated -- please use address parameter instead. Place ID acquired from the Fetch Places endpoint.","deprecated":true},"address":{"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},"appointmentContact":{"type":"object","properties":{"email":{"type":"string","description":"Contact email to receive consignee scheduling notifications."},"phoneNumber":{"type":"string","description":"Contact phone number in .e164 format.<br><br>For example: +17148130000"}},"required":["email","phoneNumber"],"additionalProperties":false,"description":"Only for use with the scheduleDelivery accessorial. Alternate contact information if the consignee is not scheduling delivery."}},"required":["openTime","closeTime"],"additionalProperties":false,"description":"Object containing delivery (consignee) location information. Must contain either placeId or address."},"rateResponseTimeoutMs":{"type":"number","format":"float","minimum":5000,"default":25000,"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)"},"freight":{"type":"array","items":{"type":"object","properties":{"quantity":{"type":"number","format":"float","description":"Quantity of this cargo line item"},"type":{"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."},"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"}},"required":["quantity","type","weight","length","width","height"],"additionalProperties":false},"minItems":1,"description":"Array of freight information. Each array element represents a different line item of freight"},"pickupReadyDate":{"anyOf":[{"type":"string","format":"date-time","description":"Deprecated. ISOString in UTC.","deprecated":true},{"type":"object","properties":{"date":{"type":"string","pattern":"[0-9][0-0][0-9][0-9]-[0-9][0-9]-[0-9][0-9]"},"time":{"type":"string","minLength":4,"maxLength":4}},"required":["date","time"],"additionalProperties":false}],"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\"}"},"applyAvailableCredits":{"type":"boolean","default":true,"description":"If false, will not apply any available credits on the shipper account to this quote"},"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},"CreateQuoteResponseSchema":{"type":"object","properties":{"data":{"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":{"type":"object","properties":{"id":{"type":"string"},"price":{"type":"number","format":"float","description":"Price, in USD, of the rate"},"transitDays":{"type":"object","properties":{"minimum":{"type":"number","format":"float","minimum":0},"maximum":{"type":"number","format":"float","minimum":0}},"required":["minimum","maximum"],"additionalProperties":false,"description":"Range number of transit days"},"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":{"type":"string","enum":["mothership","abf","centralTransport","customCompanies","daylight","forwardAir","frontline","oldDominion","roadrunner","saia","southeastern","tforce","ups","ward","xpo","conway","partner"],"description":"The shipping provider for this rate"},"providerScac":{"type":"string","enum":["mhpg","abfs","ctii","ctbv","dylt","fwdn","fcsy","odfl","rdfs","saia","sefl","tfin","upgf","ward","xpol","cnwy","partner"],"description":"The shipping provider for this rate"},"truck":{"type":"object","properties":{"equipment":{"type":"string","enum":["any","straightTruck","tractor"]},"specialty":{"type":"string","enum":["reefer","flatbed","dryVan"]}},"required":["equipment","specialty"],"additionalProperties":false,"description":"Truck is deprecated. This is the truck equipment and specialty for this rate. This is often unknown as purchase time so should be ignored.","deprecated":true},"services":{"type":"array","items":{"type":"string","enum":["dedicated","teamDrive","custom","standard","guaranteed","guaranteed08","guaranteed09","guaranteed10","guaranteed11","guaranteed12","guaranteed14","guaranteed15","guaranteed1530","expedited","expedited12","expedited17","accelerated","guaranteedWithinWindow","guaranteedMultiHourWindow","guaranteedSingleHourWindow","capacityLoad","unknown"],"description":"Services included with this rate"},"default":[],"description":"List of services associated with this rate"},"serviceType":{"type":"string","enum":["nextDay","sameDay","customRate","limitedAccessRegional","lowest","bestValue","fastest","flatbed","reefer","other"],"description":"Service type is deprecated in favor of the services. Please use that instead. This will often be returned as \"other\"","deprecated":true},"warnings":{"type":"array","items":{"type":"string","enum":["consolidator"],"description":"Warning associated with this rate"},"default":[],"description":"List of warnings associated with this rate"},"creditsApplied":{"type":"number","format":"float","description":"Dollars of credit applied towards this rate"},"coveragePrice":{"type":"number","format":"float","description":"Price of the insurance coverage in USD"},"coveredValue":{"type":"integer","description":"Freight's value covered by insurance in USD"}},"required":["id","price","transitDays","estimatedPickupDate","estimatedDeliveryDate","provider","providerScac","truck","serviceType"],"additionalProperties":false},"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":{"type":"object","properties":{"quantity":{"type":"number","format":"float","description":"Quantity of this cargo line item"},"type":{"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."},"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"}},"required":["quantity","type","weight","length","width","height"],"additionalProperties":false},"minItems":1,"description":"Array of freight information. Each array element represents a different line item of freight"},"pickup":{"type":"object","properties":{"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":{"type":"string","enum":["alcohol","appointment","cfs","crossDock","hazmat","homeDelivery","inside","liftgate","limitedAccess","localInsideDelivery","residential","scheduledDelivery","sortSeg","tobacco","tradeshow","twicRequired"]},"uniqueItems":true,"default":[],"description":"Array of accessorials required at this location"},"emails":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[],"description":"Array of emails to receive notification emails"},"openTime":{"type":"string","pattern":"[0-9]+","minLength":4,"maxLength":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","pattern":"[0-9]+","minLength":4,"maxLength":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"},"name":{"type":"string","description":"Business or company name"},"phoneNumber":{"type":"string","description":"Contacts phone number at this location in .e164 format<br><br>For example: +17148130000"},"street":{"type":"string","description":"Street of the address"}},"required":["city","state","zip","placeId","openTime","closeTime"],"additionalProperties":false},"delivery":{"type":"object","properties":{"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":{"type":"string","enum":["alcohol","appointment","cfs","crossDock","hazmat","homeDelivery","inside","liftgate","limitedAccess","localInsideDelivery","residential","scheduledDelivery","sortSeg","tobacco","tradeshow","twicRequired"]},"uniqueItems":true,"default":[],"description":"Array of accessorials required at this location"},"emails":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[],"description":"Array of emails to receive notification emails"},"openTime":{"type":"string","pattern":"[0-9]+","minLength":4,"maxLength":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","pattern":"[0-9]+","minLength":4,"maxLength":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"},"name":{"type":"string","description":"Business or company name"},"phoneNumber":{"type":"string","description":"Contacts phone number at this location in .e164 format<br><br>For example: +17148130000"},"street":{"type":"string","description":"Street of the address"}},"required":["city","state","zip","placeId","openTime","closeTime"],"additionalProperties":false},"metadata":{"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":{"type":"object","properties":{"field":{"type":"string"},"errorMessage":{"type":"string"}},"required":["field","errorMessage"],"additionalProperties":false},"default":[],"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"},"pickupLocationSuggestedAccessorials":{"type":"array","items":{"type":"string","enum":["alcohol","appointment","cfs","crossDock","hazmat","homeDelivery","inside","liftgate","limitedAccess","localInsideDelivery","residential","scheduledDelivery","sortSeg","tobacco","tradeshow","twicRequired"]},"uniqueItems":true,"default":[],"description":"Array of accessorials suggested at pickup location"},"deliveryLocationSuggestedAccessorials":{"type":"array","items":{"type":"string","enum":["alcohol","appointment","cfs","crossDock","hazmat","homeDelivery","inside","liftgate","limitedAccess","localInsideDelivery","residential","scheduledDelivery","sortSeg","tobacco","tradeshow","twicRequired"]},"uniqueItems":true,"default":[],"description":"Array of accessorials suggested at delivery location"}},"required":["purchasable"],"additionalProperties":false}},"required":["id","expiresAt","rates","freight","pickup","delivery","metadata"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"CancelShipmentRequestSchema":{"type":"object","properties":{"reason":{"type":"string","enum":["CargoNotReady","ShipmentCorrectionsNeeded","IncorrectCargoInfo","MissingAccessorial","ShipmentNotNeeded"],"description":"Reason for cancellation."},"acceptFees":{"type":"boolean","default":false,"description":"When true, cancel the shipment even if the currently available cancellation path has a fee. Defaults to false."},"limitAmountCents":{"oneOf":[{"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},"CancelShipmentResponseSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["cancelled"],"description":"Whether the cancellation completed successfully"},"cancellationFeeCents":{"type":"integer","minimum":0,"description":"Fee in cents associated with the completed cancellation"}},"required":["status","cancellationFeeCents"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"CreateShipmentRequestSchema":{"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},"CreateShipmentResponseSchema":{"type":"object","properties":{"data":{"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","format":"float","description":"Price paid, in USD, for the shipment"},"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":{"type":"object","properties":{"quantity":{"type":"number","format":"float","description":"Quantity of this cargo line item"},"type":{"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."},"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"}},"required":["quantity","type","weight","length","width","height","description"],"additionalProperties":false},"minItems":1,"description":"Array of freight information. Each array element represents a different line item of freight"},"pickup":{"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":{"type":"string","enum":["alcohol","appointment","cfs","crossDock","hazmat","homeDelivery","inside","liftgate","limitedAccess","localInsideDelivery","residential","scheduledDelivery","sortSeg","tobacco","tradeshow","twicRequired"]},"uniqueItems":true,"default":[],"description":"Array of accessorials required at this location"},"phoneNumber":{"type":"string","description":"Contacts phone number at this location in .e164 format<br><br>For example: +17148130000"},"emails":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[],"description":"Array of emails to receive notification emails"},"openTime":{"type":"string","pattern":"[0-9]+","minLength":4,"maxLength":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","pattern":"[0-9]+","minLength":4,"maxLength":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":["name","city","state","zip","placeId","phoneNumber","openTime","closeTime"],"additionalProperties":false},"delivery":{"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":{"type":"string","enum":["alcohol","appointment","cfs","crossDock","hazmat","homeDelivery","inside","liftgate","limitedAccess","localInsideDelivery","residential","scheduledDelivery","sortSeg","tobacco","tradeshow","twicRequired"]},"uniqueItems":true,"default":[],"description":"Array of accessorials required at this location"},"phoneNumber":{"type":"string","description":"Contacts phone number at this location in .e164 format<br><br>For example: +17148130000"},"emails":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[],"description":"Array of emails to receive notification emails"},"openTime":{"type":"string","pattern":"[0-9]+","minLength":4,"maxLength":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","pattern":"[0-9]+","minLength":4,"maxLength":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":["name","city","state","zip","placeId","phoneNumber","openTime","closeTime"],"additionalProperties":false},"trackingUrl":{"type":"string","description":"Tracking url for the shipment"}},"required":["id","createdAt","price","earliestPickupDate","estimatedDeliveryDate","freight","pickup","delivery"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"GetShipmentResponseSchema":{"type":"object","properties":{"data":{"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","format":"float","description":"Price paid, in USD, for the shipment"},"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":{"type":"object","properties":{"quantity":{"type":"number","format":"float","description":"Quantity of this cargo line item"},"type":{"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."},"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"}},"required":["quantity","type","weight","length","width","height","description"],"additionalProperties":false},"minItems":1,"description":"Array of freight information. Each array element represents a different line item of freight"},"pickup":{"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":{"type":"string","enum":["alcohol","appointment","cfs","crossDock","hazmat","homeDelivery","inside","liftgate","limitedAccess","localInsideDelivery","residential","scheduledDelivery","sortSeg","tobacco","tradeshow","twicRequired"]},"uniqueItems":true,"default":[],"description":"Array of accessorials required at this location"},"phoneNumber":{"type":"string","description":"Contacts phone number at this location in .e164 format<br><br>For example: +17148130000"},"emails":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[],"description":"Array of emails to receive notification emails"},"openTime":{"type":"string","pattern":"[0-9]+","minLength":4,"maxLength":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","pattern":"[0-9]+","minLength":4,"maxLength":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":["name","city","state","zip","placeId","phoneNumber","openTime","closeTime"],"additionalProperties":false},"delivery":{"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":{"type":"string","enum":["alcohol","appointment","cfs","crossDock","hazmat","homeDelivery","inside","liftgate","limitedAccess","localInsideDelivery","residential","scheduledDelivery","sortSeg","tobacco","tradeshow","twicRequired"]},"uniqueItems":true,"default":[],"description":"Array of accessorials required at this location"},"phoneNumber":{"type":"string","description":"Contacts phone number at this location in .e164 format<br><br>For example: +17148130000"},"emails":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[],"description":"Array of emails to receive notification emails"},"openTime":{"type":"string","pattern":"[0-9]+","minLength":4,"maxLength":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","pattern":"[0-9]+","minLength":4,"maxLength":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":["name","city","state","zip","placeId","phoneNumber","openTime","closeTime"],"additionalProperties":false},"trackingUrl":{"type":"string","description":"Tracking url for the shipment"},"estimatedLocation":{"type":"object","properties":{"latitude":{"type":"number","format":"float","description":"The latitude of the shipment's last estimated location."},"longitude":{"type":"number","format":"float","description":"The longitude of the shipment's last estimated location."}},"required":["latitude","longitude"],"additionalProperties":false},"partner":{"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}},"required":["id","createdAt","price","earliestPickupDate","estimatedDeliveryDate","freight","pickup","delivery"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"ListShipmentsResponseSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"results":{"type":"array","items":{"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","format":"float","description":"Price paid, in USD, for the shipment"},"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":{"type":"object","properties":{"quantity":{"type":"number","format":"float","description":"Quantity of this cargo line item"},"type":{"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."},"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"}},"required":["quantity","type","weight","length","width","height","description"],"additionalProperties":false},"minItems":1,"description":"Array of freight information. Each array element represents a different line item of freight"},"pickup":{"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":{"type":"string","enum":["alcohol","appointment","cfs","crossDock","hazmat","homeDelivery","inside","liftgate","limitedAccess","localInsideDelivery","residential","scheduledDelivery","sortSeg","tobacco","tradeshow","twicRequired"]},"uniqueItems":true,"default":[],"description":"Array of accessorials required at this location"},"phoneNumber":{"type":"string","description":"Contacts phone number at this location in .e164 format<br><br>For example: +17148130000"},"emails":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[],"description":"Array of emails to receive notification emails"},"openTime":{"type":"string","pattern":"[0-9]+","minLength":4,"maxLength":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","pattern":"[0-9]+","minLength":4,"maxLength":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":["name","city","state","zip","placeId","phoneNumber","openTime","closeTime"],"additionalProperties":false},"delivery":{"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":{"type":"string","enum":["alcohol","appointment","cfs","crossDock","hazmat","homeDelivery","inside","liftgate","limitedAccess","localInsideDelivery","residential","scheduledDelivery","sortSeg","tobacco","tradeshow","twicRequired"]},"uniqueItems":true,"default":[],"description":"Array of accessorials required at this location"},"phoneNumber":{"type":"string","description":"Contacts phone number at this location in .e164 format<br><br>For example: +17148130000"},"emails":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[],"description":"Array of emails to receive notification emails"},"openTime":{"type":"string","pattern":"[0-9]+","minLength":4,"maxLength":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","pattern":"[0-9]+","minLength":4,"maxLength":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":["name","city","state","zip","placeId","phoneNumber","openTime","closeTime"],"additionalProperties":false},"trackingUrl":{"type":"string","description":"Tracking url for the shipment"}},"required":["id","createdAt","price","earliestPickupDate","estimatedDeliveryDate","freight","pickup","delivery"],"additionalProperties":false}},"perPage":{"type":"number","format":"float"},"page":{"type":"number","format":"float"},"hasMore":{"type":"boolean"}},"required":["perPage","page","hasMore"],"additionalProperties":false}},"additionalProperties":false},"CreateWebhookConfigResponseSchema":{"type":"object","properties":{"data":{"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":{"type":"string","enum":["active","inactive"],"description":"Current status of the webhook config"},"subscribedEvents":{"type":"array","items":{"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"},"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}},"required":["data"],"additionalProperties":false},"CreateWebhookConfigRequestSchema":{"type":"object","properties":{"webhookUrl":{"type":"string","description":"URL that Mothership's server will POST webhook events to"},"subscribedEvents":{"type":"array","items":{"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"}},"required":["webhookUrl","subscribedEvents"],"additionalProperties":false},"GetWebhookConfigResponseSchema":{"type":"object","properties":{"data":{"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":{"type":"string","enum":["active","inactive"],"description":"Current status of the webhook config"},"subscribedEvents":{"type":"array","items":{"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"},"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}},"additionalProperties":false},"GetWebhookConfigsResponseSchema":{"type":"object","properties":{"data":{"type":"array","items":{"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":{"type":"string","enum":["active","inactive"],"description":"Current status of the webhook config"},"subscribedEvents":{"type":"array","items":{"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"},"webhookUrl":{"type":"string","description":"URL that Mothership's server will POST webhook events to"}},"required":["id","createdAt","status","subscribedEvents","webhookUrl"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false},"UpdateWebhookConfigRequestSchema":{"type":"object","properties":{"subscribedEvents":{"type":"array","items":{"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"},"webhookUrl":{"type":"string","description":"URL that Mothership's server will POST webhook events to"}},"additionalProperties":false},"UpdateWebhookConfigResponseSchema":{"type":"object","properties":{"data":{"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":{"type":"string","enum":["active","inactive"],"description":"Current status of the webhook config"},"subscribedEvents":{"type":"array","items":{"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"},"webhookUrl":{"type":"string","description":"URL that Mothership's server will POST webhook events to"}},"required":["id","createdAt","status","subscribedEvents","webhookUrl"],"additionalProperties":false}},"additionalProperties":false},"RemoveWebhookConfigRequestSchema":{"type":"object","properties":{},"additionalProperties":false},"RemoveWebhookConfigResponseSchema":{"type":"object","properties":{"data":{"type":"string"}},"additionalProperties":false},"ErrorResponseSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"code":{"type":"number","format":"float","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]},"type":{"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"]},"message":{"type":"string"},"metadata":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","type","message"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"GetTrackingResponseSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"city":{"type":"string","description":"City in which the shipment is currently residing in"},"state":{"type":"string","description":"State in which the shipment is currently residing in"},"deliveryLocationName":{"type":"string","description":"Name of the location the shipment is being delivery to"},"pickupLocationName":{"type":"string","description":"Name of the location the shipment is being picked up from"},"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"}},"required":["deliveryLocationName","pickupLocationName","eventType","shipmentReferenceNumber","timestamp"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false}},"additionalProperties":false},"GetFileResponseSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string","description":"Redirect to presigned url for file id"}},"required":["url"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"GetAccountResponseSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the payment term"},"createdAt":{"type":"string","description":"ISO string of when the payment term was first created"},"updatedAt":{"type":"string","description":"ISO string of when the payment term 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":"Are payment terms enabled for the account"},"paymentTermLengthDays":{"type":"number","format":"float","description":"The number of days from invoice to payment due"},"creditLimitAmount":{"type":"number","format":"float","description":"The total amount of term credit in USD"},"availableCreditAmount":{"type":"number","format":"float","description":"The amount in USD due remaining on the credit term"},"totalAmountDue":{"type":"number","format":"float","description":"The total amount due in USD of unpaid invoices"},"currency":{"type":"string","description":"Three-letter ISO currency code, in lowercase"}},"required":["id","createdAt","updatedAt","name","email","phoneNumber","paymentTermLengthDays"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"GetInvoicesModifiedSinceResponseSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"invoices":{"type":"array","items":{"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}},"hasMore":{"type":"boolean","description":"True if there are more records to fetch."},"total":{"type":"number","format":"float","description":"The total number of invoices that are modified on or after the date."},"limit":{"type":"number","format":"float","description":"The number of results requested in this page, not necessarily the number of results returned if on the last page."},"currentPage":{"type":"number","format":"float","description":"The index of the current page of results returned."},"nextPage":{"type":"number","format":"float","nullable":true,"description":"The index of the next page of results to fetch, if available."}},"required":["invoices","hasMore"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"GetInvoicesByShipmentIdResponseSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"invoices":{"type":"array","items":{"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}},"hasMore":{"type":"boolean","description":"True if there are more records to fetch."},"total":{"type":"number","format":"float","description":"The total number of invoices that are modified on or after the date."},"limit":{"type":"number","format":"float","description":"The number of results requested in this page, not necessarily the number of results returned if on the last page."},"currentPage":{"type":"number","format":"float","description":"The index of the current page of results returned."},"nextPage":{"type":"number","format":"float","nullable":true,"description":"The index of the next page of results to fetch, if available."}},"required":["invoices","hasMore"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"GetInvoiceResponseSchema":{"type":"object","properties":{"data":{"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","format":"float","description":"The total amount (in cents) of the invoice in USD"},"amountDue":{"type":"number","format":"float","description":"The amount (in cents) in USD due remaining on the invoice"},"credits":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":false},"description":"The credits applied to the invoice"},"lineItems":{"type":"array","items":{"type":"object","properties":{"quantity":{"type":"number","format":"float","description":"The quantity for this line item"},"type":{"type":"string","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"],"description":"The type of line item"},"unitAmountCents":{"type":"number","format":"float","description":"The unit amount in cents for this line item"},"totalAmountCents":{"type":"number","format":"float","description":"The total amount in cents for this line item"},"discountAmountCents":{"type":"number","format":"float","description":"The discount amount in cents for this line item"},"taxAmountCents":{"type":"number","format":"float","description":"The tax amount in cents for this line item"},"description":{"type":"string","description":"A human-readable description of the line item"}},"required":["quantity","type","unitAmountCents","totalAmountCents","discountAmountCents","taxAmountCents","description"],"additionalProperties":false},"description":"The individual line items that make up the invoice"},"payments":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":false},"description":"The payments applied to the invoice"},"paidAmount":{"type":"number","format":"float","description":"The amount (in cents) paid against this invoice"},"creditedAmount":{"type":"number","format":"float","description":"The amount (in cents) credit back to this invoice"},"currency":{"type":"string","description":"Three-letter ISO currency code, in lowercase. Defaulted to 'usd'."},"status":{"type":"string","enum":["open","paid","unpaid","pastDue","void"],"description":"The status of the invoice"},"referenceNumber":{"type":"string","description":"The reference number of the invoice. This is not guaranteed to be unique nor match the reference number of it's owning entity type"},"description":{"type":"string","description":"The description of the invoice"},"entityType":{"type":"string","enum":["shipment","claim","statement","payment"],"description":"The invoiceable entity type, most commonly 'shipment'. Payment processing fee invoices use 'payment'."},"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}},"required":["data"],"additionalProperties":false}},"responses":{"BadRequest":{"description":"Server cannot process request due to invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseSchema"}}}},"Unauthorized":{"description":"Requesting user is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseSchema"}}}},"Forbidden":{"description":"Requesting user does not have permission to use this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseSchema"}}}},"NotFound":{"description":"Resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseSchema"}}}}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/account":{"get":{"tags":["Account"],"summary":"Retrieve account","description":"This endpoint allows a user to retrieve details about their company account","operationId":"getAccount","responses":{"200":{"description":"Account details response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAccountResponseSchema"}}}}}}},"/documents/{shipmentId}":{"get":{"tags":["Documents"],"summary":"List shipment documents","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","in":"path","description":"Shipment ID of the shipment to generate document URLs for","required":true,"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/GetDocumentsResponseSchema"}}}}}}},"/files/{fileId}":{"get":{"tags":["Files"],"summary":"Retrieve a file","description":"This endpoint allows you to retrieve a download url for a file by file Id","operationId":"fetchFileById","parameters":[{"name":"fileId","in":"path","description":"File ID to generate a download url","required":true,"schema":{"type":"string","format":"string"}}],"responses":{"301":{"description":"Redirects to the download url for the requested file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFileResponseSchema"}}}}}}},"/invoices/modified_since":{"get":{"tags":["Invoices"],"summary":"List all modified invoices","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":"timestamp","in":"query","required":true,"description":"The ISO timestamp of the on or after date to query","schema":{"type":"string","format":"string"}},{"name":"limit","in":"query","required":false,"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":"page","in":"query","required":false,"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"}}],"responses":{"200":{"description":"Response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetInvoicesModifiedSinceResponseSchema"}}}}}}},"/invoices/by_shipment_id/{shipmentId}":{"get":{"tags":["Invoices"],"summary":"List invoices by shipment identifier","description":"This endpoint allows a user to retrieve all invoices associated with a specific shipment identifier.","operationId":"listInvoicesByShipmentId","parameters":[{"name":"shipmentId","in":"path","required":true,"description":"The public shipment reference number or internal shipment UUID to query invoices for","schema":{"type":"string","format":"string"}},{"name":"limit","in":"query","required":false,"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":"page","in":"query","required":false,"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"}}],"responses":{"200":{"description":"Response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetInvoicesByShipmentIdResponseSchema"}}}}}}},"/invoices/{invoiceId}":{"get":{"tags":["Invoices"],"summary":"Retrieve an invoice","description":"This endpoint allows a user to retrieve an invoice","operationId":"fetchInvoiceById","parameters":[{"name":"invoiceId","in":"path","description":"ID of the invoice to get fetch","required":true,"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/GetInvoiceResponseSchema"}}}}}}},"/places":{"get":{"summary":"(deprecated) Search for a place","description":"This endpoint allows a user to retrieve an array of place IDs that represent addresses that may be used as the pickup location or delivery for a quote.","tags":["Places"],"operationId":"fetchPlaces","deprecated":true,"parameters":[{"name":"zip","in":"query","required":true,"description":"Postal zip code","schema":{"type":"string","format":"string"}},{"name":"city","in":"query","required":false,"description":"City name","schema":{"type":"string","format":"string"}},{"name":"state","in":"query","required":false,"description":"2-letter state abbreviation","schema":{"type":"string","format":"string"}},{"name":"street","in":"query","required":false,"description":"Street address","schema":{"type":"string","format":"string"}}],"responses":{"200":{"description":"Place details responses are wrapped inside an array named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPlacesResponseSchema"}}}}}}},"/places/{placeId}":{"get":{"tags":["Places"],"summary":"(deprecated) Retrieve a place","description":"This endpoint allows a user to fetch address details for the given place ID.","operationId":"fetchPlace","deprecated":true,"parameters":[{"name":"placeId","in":"path","description":"Place ID of an address","required":true,"schema":{"type":"string","format":"string"}}],"responses":{"200":{"description":"Place details response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPlaceResponseSchema"}}}}}}},"/quotes":{"post":{"summary":"Create a quote","tags":["Quotes"],"operationId":"createQuote","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 }'"}]},"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.","requestBody":{"description":"Quote data","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateQuoteRequestSchema"}}}},"responses":{"201":{"description":"Created quote response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateQuoteResponseSchema"}}}}}}},"/shipments":{"post":{"tags":["Shipments"],"summary":"Create a shipment","description":"This endpoint allows a user to purchase and create a shipment under his/her shipper account.","operationId":"createShipment","requestBody":{"description":"Quote ID to purchase and Selected Rate","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShipmentRequestSchema"}}}},"responses":{"201":{"description":"Created shipment response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShipmentResponseSchema"}}}},"429":{"description":"You've created too many shipments in a short period of time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseSchema"}}}}}},"get":{"tags":["Shipments"],"summary":"List Shipments","description":"This endpoint allows a user to list all shipments booked by his/her organization.","operationId":"listShipments","parameters":[{"name":"page","in":"query","description":"current page (for first page, use 1) - if not provided, this will default to 1","required":false,"schema":{"type":"number","format":"number"}},{"name":"perPage","in":"query","description":"maximum number of shipments returned for each page - if not provided, this will default to 25","required":false,"schema":{"type":"number","format":"number"}}],"responses":{"200":{"description":"Shipment details response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListShipmentsResponseSchema"}}}}}}},"/shipments/{shipmentId}":{"get":{"tags":["Shipments"],"summary":"Retrieve a shipment","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","in":"path","description":"ID of the shipment to fetch details for","required":true,"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/GetShipmentResponseSchema"}}}}}}},"/shipments/{shipmentId}/cancel":{"post":{"tags":["Shipments"],"summary":"Cancel a shipment","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","in":"path","description":"Reference number of the shipment to cancel","required":true,"schema":{"type":"string","format":"string"}}],"requestBody":{"description":"Cancellation request including the required reason and fee acceptance controls","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelShipmentRequestSchema"}}}},"responses":{"200":{"description":"Shipment cancellation completed successfully, wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelShipmentResponseSchema"}}}},"402":{"description":"Cancellation is still possible, but the available fee exceeds what the caller accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseSchema"}}}},"409":{"description":"The shipment cannot be cancelled at this time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseSchema"}}}}}}},"/tracking/{shipmentId}":{"get":{"tags":["Tracking"],"summary":"Track a shipment","description":"This endpoint allows a user to get a list of tracking events related to a shipment","operationId":"fetchShipmentTracking","parameters":[{"name":"shipmentId","in":"path","description":"Shipment ID of the shipment to get tracking","required":true,"schema":{"type":"string","format":"string"}}],"responses":{"200":{"description":"Tracking responses are wrapped inside an array named \"results\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTrackingResponseSchema"}}}}}}},"/webhookConfigs":{"get":{"tags":["Webhooks"],"summary":"List webhooks","description":"This endpoint allows a user to fetch all webhook configs set up for his/her shipper account.","operationId":"fetchWebhookConfigsForAccount","responses":{"200":{"description":"Webhook config responses are wrapped inside an array named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWebhookConfigsResponseSchema"}}}}}},"post":{"tags":["Webhooks"],"summary":"Create a webhook configuration","description":"This endpoint allows a user to create a webhook config for his/her shipper account.","operationId":"createWebhookConfig","requestBody":{"description":"Data used to create a Webhook Config","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookConfigRequestSchema"}}}},"responses":{"201":{"description":"Created webhook config response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookConfigResponseSchema"}}}}}}},"/webhookConfigs/{webhookConfigId}":{"get":{"tags":["Webhooks"],"summary":"Retrieve a webhook configuration","description":"This endpoint allows a user to fetch the webhook config represented by webhookConfigId.","operationId":"fetchWebhookConfig","parameters":[{"name":"webhookConfigId","in":"path","description":"ID of the webhook config to fetch","required":true,"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/GetWebhookConfigResponseSchema"}}}}}},"put":{"tags":["Webhooks"],"summary":"Update a webhook configuration","description":"This endpoint allows a user to update the webhook config represented by webhookConfigId.","operationId":"updateWebhookConfig","parameters":[{"name":"webhookConfigId","in":"path","description":"ID of the webhook config to update","required":true,"schema":{"type":"string","format":"string"}}],"requestBody":{"description":"Webhook Config data","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookConfigRequestSchema"}}}},"responses":{"200":{"description":"Updated webhook config response is wrapped inside an object named \"data\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookConfigResponseSchema"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Remove a webhook configuration","description":"This endpoint allows a user to remove the webhook config represented by webhookConfigId.","operationId":"removeWebhookConfig","parameters":[{"name":"webhookConfigId","in":"path","description":"ID of the webhook config to remove","required":true,"schema":{"type":"string","format":"string"}}],"responses":{"200":{"description":"Webhook config removed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveWebhookConfigResponseSchema"}}}}}}}}}