Skip to main content

Historical contract: Create Order Attachment

Historical API contract. This page describes an earlier API contract. Methods, paths, and responses may differ from the current API.

Historical meaning​

Create Order Attachment

This API endpoint is used to add and attachments to an order.

Current API​

For new integrations, use the linked current API reference or guide.

View the current API reference

Parameters​

[
{
"name": "language",
"in": "path",
"schema": {
"type": "string",
"default": "en"
},
"required": true
},
{
"name": "project",
"in": "path",
"schema": {
"type": "string",
"default": "<redacted-personal>"
},
"required": true
},
{
"name": "order_id",
"in": "path",
"schema": {
"type": "integer",
"format": "int32"
},
"required": true
},
{
"name": "api_version",
"in": "path",
"schema": {
"type": "string",
"default": "v400"
},
"required": true
}
]

Request body​

{
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"user_id",
"type"
],
"properties": {
"user_id": {
"type": "integer",
"format": "int32"
},
"type": {
"type": "string"
},
"note": {
"type": "string",
"description": "Is requiered if type 1"
},
"file": {
"type": "string",
"description": "Is required if type 2,3 and 4",
"format": "binary"
}
}
}
}
}
}

Responses​

{
"200": {
"description": "200",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": false,\n \"result\": {\n \"user_id\": 0,\n \"type\": \"1\",\n \"note\": \"Here we go!\",\n \"order_id\": \"<redacted-id>\",\n \"updated_at\": \"2018-11-29 21:03:18\",\n \"created_at\": \"2018-11-29 21:03:18\",\n \"id\": 2\n }\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": false,
"default": true
},
"result": {
"type": "object",
"properties": {
"user_id": {
"type": "integer",
"example": 0,
"default": 0
},
"type": {
"type": "string",
"example": "1"
},
"note": {
"type": "string",
"example": "Here we go!"
},
"order_id": {
"type": "string",
"example": "<redacted-id>"
},
"updated_at": {
"type": "string",
"example": "2018-11-29 21:03:18"
},
"created_at": {
"type": "string",
"example": "2018-11-29 21:03:18"
},
"id": {
"type": "integer",
"example": 2,
"default": 0
}
}
}
}
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": true,\n \"result\": [\n \"The attachment could not be registered.\"\n ]\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": true,
"default": true
},
"result": {
"type": "array",
"items": {
"type": "string",
"example": "The attachment could not be registered."
}
}
}
}
}
}
},
"401": {
"description": "401",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": true,\n \"result\": [\n \"You do not have permission.\"\n ]\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": true,
"default": true
},
"result": {
"type": "array",
"items": {
"type": "string",
"example": "You do not have permission."
}
}
}
}
}
}
}
}