# Inputs / Orders

# Orders

**Object**
## OrderAttachmentInput

| Fields | Type | Description | Validation |
| --- | --- | --- | --- |
| name | *String!* | The name of the attachment | Minimum Length: 1Maximum Length: 160 |
| url | *String!* | The destination URL of the attachment |  |



**Object**
## OrderGenerationInput

| Fields | Type | Description | Validation |
| --- | --- | --- | --- |
| includeSales | *Boolean!* | Whether the order generation should take into account sales made |  |
| includeTransfers | *Boolean* | Whether the order generation should take into account transfers (defaults to false) |  |
| includeReorderPoints | *Boolean!* | Whether the order generation should take into account reorder points |  |
| analyseDays | *Float* | The amount of days to analyse (only applicable when includeSales is true) | Minimum: 0 |
| orderDays | *Float* | The amount of days to order for (only applicable when includeSales is true) | Minimum: 0 |
| checkOnOrder | *Boolean* | Whether the order generation should take into account products currently on order (only applicable when using includeSales or includeTransfers) |  |
| matchCoreSupplier | *Boolean* | Whether the order generation should match to the core supplier or the last supplier (only if from is set to null), defaults to true |  |
| analyseAllOutlets | *Boolean* | Whether all outlets should be analysed (only used for multi-stores), defaults to false |  |
| categories | [[ID]](/documentation/Types/UUID#UUID) | The categories to filter the generation by, if you'd like to use the entire store, provide this as `null` |  |



**Object**
## OrderProductInput

| Fields | Type | Description | Validation |
| --- | --- | --- | --- |
| id | [ID!](/documentation/Types/UUID#UUID) | The ID of the product |  |
| caseQuantity | *Float* | The case quantity of the product, defaults to the product's current case quantity | Minimum: 1Maximum: 9,999 |
| orderedQuantity | *Float!* | The quantity that was ordered | Minimum: -10,000,000,000Maximum: 10,000,000,000 |
| receivedQuantity | *Float!* | The quantity that was received | Minimum: -10,000,000,000Maximum: 10,000,000,000 |
| cost | *Float!* | The base case cost for the product | Minimum: -100,000,000,000Maximum: 100,000,000,000 |
| orderedCost | *Float* | The base cost for when the product was ordered | Minimum: -100,000,000,000Maximum: 100,000,000,000 |
| fees | *Float* | The fees assigned to the product | Minimum: -1,000,000Maximum: 1,000,000 |
| freight | *Float* | The freight assigned to the product | Minimum: -1,000,000Maximum: 1,000,000 |
| rebate | *Float* | The purchase rebate assigned to the product | Minimum: -10,000Maximum: 10,000 |
| paymentFees | *Float* | The payment fees assigned to the product | Minimum: -1,000,000Maximum: 1,000,000 |
| supplier | [ID](/documentation/Types/UUID#UUID) | The supplier for the product, defaults to the current supplier on the order |  |
| supplierCode | *String* | The supplier code for the product | Maximum Length: 160 |



**Object**
## OrderProductMatchInput

| Fields | Type | Description | Validation |
| --- | --- | --- | --- |
| productName | *String!* | The name of the product, used only if a temporary product needs to be created | Minimum Length: 1Maximum Length: 160 |
| caseQuantity | *Float* | The case quantity of the product, defaults to the product's current case quantity | Minimum: 1Maximum: 9,999 |
| orderedQuantity | *Float!* | The quantity that was ordered | Minimum: -10,000,000,000Maximum: 10,000,000,000 |
| receivedQuantity | *Float!* | The quantity that was received | Minimum: -10,000,000,000Maximum: 10,000,000,000 |
| cost | *Float!* | The base case cost for the product | Minimum: -100,000,000,000Maximum: 100,000,000,000 |
| fees | *Float* | The fees assigned to the product | Minimum: -1,000,000Maximum: 1,000,000 |
| freight | *Float* | The freight assigned to the product | Minimum: -1,000,000Maximum: 1,000,000 |
| rebate | *Float* | The purchase rebate assigned to the product | Minimum: -10,000Maximum: 10,000 |
| paymentFees | *Float* | The payment fees assigned to the product | Minimum: -1,000,000Maximum: 1,000,000 |
| taxRate | *Float* | The tax rate percentage this product is purchased using, to use the default tax rate for the store, set to `null`, to specify no tax, set to 0 | Minimum: 0Maximum: 1,000 |
| matchDetails | [OrderProductMatchesInput](/documentation/Inputs/Orders#OrderProductMatchesInput) | The potential match codes for the product |  |



**Object**
## OrderProductMatchesInput

| Fields | Type | Description | Validation |
| --- | --- | --- | --- |
| id | [ID](/documentation/Types/UUID#UUID) | The ID of the product |  |
| mdbId | *Int* | The MDB id for the product | Minimum: 1 |
| supplierCodes | *[String!]* | The supplier codes for the product |  |
| supplierCode | *String* | The supplier code for the product | Maximum Length: 160 |
| barcodes | *[String!]* | The barcodes for the product | Maximum Length: 160 |