# File Upload

## Get Order Files

<mark style="color:blue;">`GET`</mark> `https://api.zortout.com/api.aspx`

Get list of files in order.

#### Query Parameters

| Name                                      | Type   | Description                                                                         |
| ----------------------------------------- | ------ | ----------------------------------------------------------------------------------- |
| method<mark style="color:red;">\*</mark>  | String | "GETORDERFILES"                                                                     |
| number                                    | String | <p>Order Number Require if id = 0 or null</p><p>\*Must have either id or number</p> |
| id                                        | Int    | <p>Order ID</p><p>\*Must have either id or number</p>                               |
| version<mark style="color:red;">\*</mark> | String | 3                                                                                   |
| format                                    | String | json (Default), xml                                                                 |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| storename<mark style="color:red;">\*</mark> | String | Store Name  |
| apikey<mark style="color:red;">\*</mark>    | String | API Key     |
| apisecret<mark style="color:red;">\*</mark> | String | API Secret  |

{% tabs %}
{% tab title="200: OK Success" %}
{% tabs %}
{% tab title="Response" %}

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

## Get Order File Detail

<mark style="color:blue;">`GET`</mark> `https://api.zortout.com/api.aspx`

Get file detail and binary data of order.

#### Query Parameters

| Name                                      | Type   | Description                                                                         |
| ----------------------------------------- | ------ | ----------------------------------------------------------------------------------- |
| method<mark style="color:red;">\*</mark>  | String | “GETORDERFILEDETAIL”                                                                |
| fileid<mark style="color:red;">\*</mark>  | Int    | File ID                                                                             |
| number                                    | String | <p>Order Number Require if id = 0 or null</p><p>\*Must have either id or number</p> |
| id                                        | Int    | <p>Order ID</p><p>\*Must have either id or number</p>                               |
| version<mark style="color:red;">\*</mark> | String | 3                                                                                   |
| format                                    | String | json (Default), xml                                                                 |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| storename<mark style="color:red;">\*</mark> | String | Store Name  |
| apikey<mark style="color:red;">\*</mark>    | String | API Key     |
| apisecret<mark style="color:red;">\*</mark> | String | API Secret  |

{% tabs %}
{% tab title="200: OK Success" %}
{% tabs %}
{% tab title="Response" %}

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

## Add File to Order

<mark style="color:green;">`POST`</mark> `https://api.zortout.com/api.aspx`

Add file to order.

#### Query Parameters

| Name                                      | Type   | Description                                                                         |
| ----------------------------------------- | ------ | ----------------------------------------------------------------------------------- |
| method<mark style="color:red;">\*</mark>  | String | "ADDORDERFILE"                                                                      |
| number                                    | String | <p>Order Number Require if id = 0 or null</p><p>\*Must have either id or number</p> |
| id                                        | Int    | <p>Order ID</p><p>\*Must have either id or number</p>                               |
| version<mark style="color:red;">\*</mark> | String | 3                                                                                   |
| format                                    | String | json (Default), xml                                                                 |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| storename<mark style="color:red;">\*</mark> | String | Store Name  |
| apikey<mark style="color:red;">\*</mark>    | String | API Key     |
| apisecret<mark style="color:red;">\*</mark> | String | API Secret  |

#### Request Body

| Name                                   | Type | Description      |
| -------------------------------------- | ---- | ---------------- |
| file<mark style="color:red;">\*</mark> | File | File Binary Data |

{% tabs %}
{% tab title="200: OK Success" %}
{% tabs %}
{% tab title="Response" %}

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

## Get Purchase Order Files

<mark style="color:blue;">`GET`</mark> `https://api.zortout.com/api.aspx`

Get list of files in purchase order.

#### Query Parameters

| Name                                      | Type   | Description                                                                                  |
| ----------------------------------------- | ------ | -------------------------------------------------------------------------------------------- |
| method<mark style="color:red;">\*</mark>  | String | "GETPURCHASEORDERFILES"                                                                      |
| number                                    | String | <p>Purchase Order Number Require if id = 0 or null</p><p>\*Must have either id or number</p> |
| id                                        | Int    | <p>Purchase Order ID</p><p>\*Must have either id or number</p>                               |
| version<mark style="color:red;">\*</mark> | String | 3                                                                                            |
| format                                    | String | json (Default), xml                                                                          |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| storename<mark style="color:red;">\*</mark> | String | Store Name  |
| apikey<mark style="color:red;">\*</mark>    | String | API Key     |
| apisecret<mark style="color:red;">\*</mark> | String | API Secret  |

{% tabs %}
{% tab title="200: OK Success" %}
{% tabs %}
{% tab title="Response" %}

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

## Get Purchase Order File Detail

<mark style="color:blue;">`GET`</mark> `https://api.zortout.com/api.aspx`

Get file detail and binary data of purchase order.

#### Query Parameters

| Name                                      | Type   | Description                                                                                  |
| ----------------------------------------- | ------ | -------------------------------------------------------------------------------------------- |
| method<mark style="color:red;">\*</mark>  | String | “GETPURCHASEORDERFILEDETAIL”                                                                 |
| format                                    | String | json (Default), xml                                                                          |
| version<mark style="color:red;">\*</mark> | String | 3                                                                                            |
| id                                        | Int    | <p>Purchase Order ID</p><p>\*Must have either id or number</p>                               |
| number                                    | String | <p>Purchase Order Number Require if id = 0 or null</p><p>\*Must have either id or number</p> |
| fileid<mark style="color:red;">\*</mark>  | Int    | File ID                                                                                      |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| storename<mark style="color:red;">\*</mark> | String | Store Name  |
| apikey<mark style="color:red;">\*</mark>    | String | API Key     |
| apisecret<mark style="color:red;">\*</mark> | String | API Secret  |

{% tabs %}
{% tab title="200: OK Success" %}
{% tabs %}
{% tab title="Response" %}

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

## Add File to Purchase Order

<mark style="color:green;">`POST`</mark> `https://api.zortout.com/api.aspx`

Add file to purchase order.

#### Query Parameters

| Name                                      | Type   | Description                                                                                  |
| ----------------------------------------- | ------ | -------------------------------------------------------------------------------------------- |
| method<mark style="color:red;">\*</mark>  | String | "ADDPURCHASEORDERFILE"                                                                       |
| number                                    | String | <p>Purchase Order Number Require if id = 0 or null</p><p>\*Must have either id or number</p> |
| id                                        | Int    | <p>Purchase Order ID</p><p>\*Must have either id or number</p>                               |
| version<mark style="color:red;">\*</mark> | String | 3                                                                                            |
| format                                    | String | json (Default), xml                                                                          |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| storename<mark style="color:red;">\*</mark> | String | Store Name  |
| apikey<mark style="color:red;">\*</mark>    | String | API Key     |
| apisecret<mark style="color:red;">\*</mark> | String | API Secret  |

#### Request Body

| Name                                   | Type | Description      |
| -------------------------------------- | ---- | ---------------- |
| file<mark style="color:red;">\*</mark> | File | File Binary Data |

{% tabs %}
{% tab title="200: OK Success" %}
{% tabs %}
{% tab title="Response" %}

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}
