Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
469 lines (469 sloc) 11.7 KB
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "#",
"title": "An Arta Job",
"type": "object",
"readOnly": true,
"properties": {
"id": {
"description": "The ARTA Id",
"type": "string",
"pattern": "^[-a-zA-Z0-9_]{32}$"
},
"url": {
"description": "The url of the request in the ARTA platform.",
"type": "string",
"format": "uri"
},
"label_url": {
"description": "The downloadable packing label if available. This is mostly used for Parcel services.",
"type": "string",
"format": "uri"
},
"name": {
"description": "The name of the job, this matches the request",
"type": "string",
"maxLength": 255
},
"total": {
"allOf": [
{
"$ref": "object.schema.json#/definitions/monetary_amount"
},
{
"description": "The total cost of the job"
}
]
},
"total_currency": {
"allOf": [
{
"$ref": "metadata/currency.schema.json#/definitions/currency_code"
},
{
"description": "The currency of the total"
}
]
},
"issued_total": {
"allOf": [
{
"$ref": "object.schema.json#/definitions/monetary_amount"
},
{
"description": "The total cost of the job before any conversion"
}
]
},
"issued_total_currency": {
"allOf": [
{
"$ref": "metadata/currency.schema.json#/definitions/currency_code"
},
{
"description": "The currency of the total before any conversion"
}
]
},
"exchange_rate": {
"allOf": [
{
"$ref": "object.schema.json#/definitions/monetary_amount"
},
{
"description": "The currency exchange rate for which all conversion is based"
}
]
},
"amount_paid": {
"allOf": [
{
"$ref": "object.schema.json#/definitions/monetary_amount"
},
{
"description": "The amount of the job that has been paid."
}
]
},
"amount_paid_currency": {
"allOf": [
{
"$ref": "metadata/currency.schema.json#/definitions/currency_code"
},
{
"description": "The currency of the amount paid. Typically this matches the total currency"
}
]
},
"invoice": {
"description": "The url of the invoice for the job.",
"type": "string",
"format": "uri"
},
"invoice_amount": {
"allOf": [
{
"$ref": "object.schema.json#/definitions/monetary_amount"
},
{
"description": "The amount of the job that has been invoiced."
}
]
},
"invoice_amount_currency": {
"allOf": [
{
"$ref": "metadata/currency.schema.json#/definitions/currency_code"
},
{
"description": "The currency of the invoice amount. Typically this matches the total currency"
}
]
},
"quote": {
"$ref": "#/definitions/purchased_quote"
},
"insurance": {
"type": "object",
"description": "The purchased insurance",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"description": "type of insurance is being quoted",
"type": "string"
},
"quoted_value": {
"allOf": [
{
"$ref": "object.schema.json#/definitions/monetary_amount"
},
{
"description": "The value (sum of object values) on which the insurance amount is based"
}
]
},
"quoted_value_currency": {
"allOf": [
{
"$ref": "metadata/currency.schema.json#/definitions/currency_code"
},
{
"description": "The currency of the quoted value"
}
]
}
}
},
"status": {
"description": "The status of the job",
"type": "string",
"oneOf": [
{
"const": "pending",
"description": "The job is pending confirmation, you may still cancel the job at this time."
},
{
"const": "confirmed",
"description": "The job has been confirmed."
},
{
"const": "in_progress",
"description": "The job is in progress."
},
{
"const": "exception",
"description": "An exception has occurred on the job. Please see the status details and tracking info for more information or if any action is required."
},
{
"const": "completed",
"description": "The job has been completed."
},
{
"const": "cancelled",
"description": "The job was cancelled."
}
]
},
"status_details": {
"description": "Any details regarding status.",
"type": "string"
},
"objects": {
"type": "array",
"description": "A list of packed objects",
"items": {
"$ref": "packed-object.schema.json"
}
},
"origin_locations": {
"allOf": [
{
"$ref": "request.schema.json#/definitions/locations"
},
{
"description": "All of the origin locations of the job"
}
]
},
"destination_locations": {
"allOf": [
{
"$ref": "request.schema.json#/definitions/locations"
},
{
"description": "All of the destination locations of the job"
}
]
},
"request": {
"type": "object",
"required": [
"request_type",
"additional_services",
"insurance",
"notes"
],
"properties": {
"name": {
"description": "A user defined name for the request",
"type": "string",
"maxLength": 255
},
"request_type": {
"$ref": "request.schema.json#/definitions/request_type"
},
"customer_reference": {
"type": "string",
"description": "This field can be used to pass through any character data that you may want returned unaltered.",
"maxLength": 255
},
"insurance": {
"type": "string",
"description": "The id of an insurance type. If requesting ARTA insurance, object values must be provided."
},
"additional_services": {
"$ref": "request.schema.json#/definitions/request_type"
},
"notes": {
"type": "string",
"description": "This field can be used to pass through any notes a customer might want to provide about the request"
},
"currency": {
"allOf": [
{
"$ref": "metadata/currency.schema.json#/definitions/currency_code"
},
{
"description": "The currency that the quote should be returned in."
}
]
}
}
},
"estimated_start_time": {
"allOf": [
{
"$ref": "#/definitions/date_type"
},
{
"description": "The estimated date-time that the shipment would start"
}
]
},
"estimated_complete_time": {
"allOf": [
{
"$ref": "#/definitions/date_type"
},
{
"description": "The estimated date-time that the shipment would be completed"
}
]
},
"actual_start_time": {
"description": "The actual start date",
"type": "string",
"format": "date-time"
},
"actual_complete_time": {
"description": "The actual date of completion",
"type": "string",
"format": "date-time"
},
"vendors": {
"description": "The list of vendors involved. Vendor information is typically not available until after confirmation",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The vendor id"
},
"name": {
"type": "string",
"description": "The human readable name of the vendor"
},
"contacts": {
"type": "array",
"description": "The vendor contacts",
"items": {
"$ref": "contact.schema.json"
}
}
}
}
},
"tracking_info": {
"type": "array",
"description": "A list of any available tracking information",
"items": {
"oneOf": [
{
"$ref": "tracking-response.schema.json"
},
{
"type": "object",
"properties": {
"carrier_name": {
"type": "string",
"description": "The carrier name"
},
"tracking_number": {
"type": "string",
"description": "The tracking number"
},
"tracking_url": {
"description": "A url for the 3rd party tracking page",
"type": "string",
"format": "uri"
}
}
}
]
}
}
},
"definitions": {
"date_type": {
"$id": "#/definition/date_type",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"flexible",
"range",
"exact",
"before",
"after"
]
},
"date": {
"type": "string",
"format": "date-time"
},
"range": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": {
"type": "string",
"format": "date-time"
}
}
},
"oneOf": [
{
"if": {
"properties": {
"type": {
"const": "flexible"
}
}
},
"then": {
"properties": {
"date": {
"type": "null"
},
"range": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "range"
}
}
},
"then": {
"properties": {
"date": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"oneOf": [
{
"const": "exact"
},
{
"const": "before"
},
{
"const": "after"
}
]
}
}
},
"then": {
"properties": {
"range": {
"type": "null"
}
}
}
}
]
},
"purchased_quote": {
"$id": "#/definitions/purchased_quote",
"type": "object",
"allOf": [
{
"$ref": "quote.schema.json#/definitions/name_description"
},
{
"description": "The purchased quote information"
},
{
"properties": {
"services": {
"type": "array",
"description": "An array of the purchased services",
"items": {
"$ref": "quote.schema.json#/definitions/line_item_service"
}
}
}
}
]
}
}
}
You can’t perform that action at this time.