# Module Thu Mua

### RESTFul API working with GET, POST, PUT, DELETE / RESTFul API thao tác Lấy (GET), Thêm (POST), Sửa (PUT), Xóa (DELETE) Purchase OrderVouchers

#### Primary Key: `Code`

#### Schema

| Field                   | Type      | Description               |
| ----------------------- | --------- | ------------------------- |
| Amount                  | string    | Amount                    |
| Attachments             | serialize | Attachments               |
| Branch                  | string    | Branch                    |
| Code                    | string    | Code                      |
| Contact                 | string    | Contact                   |
| ContactAddress          | string    | Contact Address           |
| ContactEmail            | string    | Contact Email             |
| ContactIdentifiedNumber | string    | Contact Identified Number |
| ContactName             | string    | Contact Name              |
| ContactPhone            | string    | Contact Phone             |
| Creator                 | string    | Creator                   |
| DateOfCreated           | datetime  | Date Of Created           |
| DateOfOrder             | datetime  | Date Of Order             |
| DateOfReceived          | datetime  | Date Of Received          |
| DeliveryAddress         | string    | Delivery Address          |
| DirectReceiver          | string    | Direct Receiver           |
| Id                      | numeric   | Id                        |
| Note                    | string    | Note                      |
| Object                  | string    | Object                    |
| ObjectAddress           | string    | Object Address            |
| ObjectBankCode          | string    | Object Bank Code          |
| ObjectBankName          | string    | Object Bank Name          |
| ObjectEmail             | string    | Object Email              |
| ObjectIdentifiedNumber  | string    | Object Identified Number  |
| ObjectName              | string    | Object Name               |
| ObjectPhone             | string    | Object Phone              |
| ObjectTaxCode           | string    | Object Tax Code           |
| OrderStaff              | string    | Order Staff               |
| Permission              | string    | Permission                |
| PriceTable              | string    | Price Table               |
| Recipient               | string    | Recipient                 |
| RequireInvoice          | boolean   | Require Invoice           |
| State                   | string    | State                     |
| SubNote                 | string    | Sub Note                  |
| Tax                     | string    | Tax                       |
| TaxAuthority            | string    | Tax Authority             |
| TaxAuthorityName        | string    | Tax Authority Name        |
| TaxNo                   | numeric   | Tax No                    |
| TaxPdf                  | serialize | Tax Pdf                   |
| TaxQueryCode            | string    | Tax Query Code            |
| TaxQueryLink            | string    | Tax Query Link            |
| TaxReleaseDate          | datetime  | Tax Release Date          |
| TaxSupplier             | string    | Tax Supplier              |
| TaxSupplierName         | string    | Tax Supplier Name         |
| TaxSymbol               | string    | Tax Symbol                |
| TaxXml                  | serialize | Tax Xml                   |
| Thread                  | string    | Thread                    |
| Title                   | string    | Title                     |
| TotalMoney              | string    | Total Money               |
| Type                    | string    | Type                      |

#### GET

**Description: Get item or list paging by offset and limit parameters**

**Endpoint(s):**

* `GET /v4/purchase/order-vouchers/{Code}`: for get exacly item
* `GET /v4/purchase/order-vouchers`: for get multiple items

**Parameters:**

* `token`: authentication token (Type: `string`)
* `offset`: get items from offset (Type: `int`)
* `limit`: get number of items (Type: `int`)
* `id<no>`: type is string and start from 0 for get one or more special items, id maybe end of enpoint / (Type: `string`)
* `filter_<Field>`: filter items by like value (Type: `string`)
* `left_<Field>`: filter items by like left of value (Type: `string`)
* `right_<Field>`: filter items by like right of value (Type: `string`)
* `eq_<Field>`: filter items by equal value (Type: `string`)
* `ne_<Field>`: filter items by not equal value (Type: `string`)
* `lt_<Field>`: filter items by less than value (Type: `string`)
* `le_<Field>`: filter items by less than or equal value (Type: `string`)
* `gt_<Field>`: filter items by greater then value (Type: `string`)
* `ge_<Field>`: filter items by greater than or equal value (Type: `string`)

#### POST

**Description: Create new items**

**Endpoint: `POST /v4/purchase/order-vouchers`**

**Payload:**

* Content-Type: `application/json`
* Data: JSON Array of objects defined in Schema

#### PUT

**Description: Update items by ids**

* `PUT /v4/purchase/order-vouchers/{Code}`: for put exacly item
* `PUT /v4/purchase/order-vouchers`: for put multiple items

**Payload:**

* Content-Type: `application/json`
* Data: JSON Array of objects defined in Schema

#### DELETE

**Description: Delete items by ids**

**Endpoint(s):**

* `DELETE /v4/purchase/order-vouchers/{Code}`: for delete exacly item
* `DELETE /v4/purchase/order-vouchers?id0=123&id1=456&...`: for delete multiple items with id0 id1,...

### RESTFul API working with GET, POST, PUT, DELETE / RESTFul API thao tác Lấy (GET), Thêm (POST), Sửa (PUT), Xóa (DELETE) Purchase OrderVoucherDetails

#### Primary Key: `Order, SystemUuid`

#### Schema

| Field               | Type         | Description           |
| ------------------- | ------------ | --------------------- |
| Business            | indexobjects | Business              |
| Description         | string       | Description           |
| Id                  | numeric      | Id                    |
| Image               | serialize    | Image                 |
| No                  | numeric      | No                    |
| Order               | string       | Order                 |
| Price               | double       | Price                 |
| Product             | string       | Product               |
| ProductName         | string       | Product Name          |
| ProductTaxName      | string       | Product Tax Name      |
| Quantity            | double       | Quantity              |
| SupplierProductName | string       | Supplier Product Name |
| SupplierSku         | string       | Supplier Sku          |
| SystemUuid          | string       | System Uuid           |
| Tax                 | string       | Tax                   |
| ToMoney             | double       | To Money              |
| Type                | string       | Type                  |
| Unit                | string       | Unit                  |
| VatTax              | string       | Vat Tax               |

#### GET

**Description: Get item or list paging by offset and limit parameters**

**Endpoint(s):**

* `GET /v4/purchase/order-voucher-details/{Order}-{SystemUuid}`: for get exacly item
* `GET /v4/purchase/order-voucher-details`: for get multiple items

**Parameters:**

* `token`: authentication token (Type: `string`)
* `offset`: get items from offset (Type: `int`)
* `limit`: get number of items (Type: `int`)
* `id<no>`: type is string and start from 0 for get one or more special items, id maybe end of enpoint / (Type: `string`)
* `filter_<Field>`: filter items by like value (Type: `string`)
* `left_<Field>`: filter items by like left of value (Type: `string`)
* `right_<Field>`: filter items by like right of value (Type: `string`)
* `eq_<Field>`: filter items by equal value (Type: `string`)
* `ne_<Field>`: filter items by not equal value (Type: `string`)
* `lt_<Field>`: filter items by less than value (Type: `string`)
* `le_<Field>`: filter items by less than or equal value (Type: `string`)
* `gt_<Field>`: filter items by greater then value (Type: `string`)
* `ge_<Field>`: filter items by greater than or equal value (Type: `string`)

#### POST

**Description: Create new items**

**Endpoint: `POST /v4/purchase/order-voucher-details`**

**Payload:**

* Content-Type: `application/json`
* Data: JSON Array of objects defined in Schema

#### PUT

**Description: Update items by ids**

* `PUT /v4/purchase/order-voucher-details/{Order}-{SystemUuid}`: for put exacly item
* `PUT /v4/purchase/order-voucher-details`: for put multiple items

**Payload:**

* Content-Type: `application/json`
* Data: JSON Array of objects defined in Schema

#### DELETE

**Description: Delete items by ids**

**Endpoint(s):**

* `DELETE /v4/purchase/order-voucher-details/{Order}-{SystemUuid}`: for delete exacly item
* `DELETE /v4/purchase/order-voucher-details?id0=123&id1=456&...`: for delete multiple items with id0 id1,...

### RESTFul API working with GET, POST, PUT, DELETE / RESTFul API thao tác Lấy (GET), Thêm (POST), Sửa (PUT), Xóa (DELETE) Purchase Vouchers

#### Primary Key: `Code`

#### Schema

| Field                     | Type     | Description                 |
| ------------------------- | -------- | --------------------------- |
| Amount                    | double   | Amount                      |
| Branch                    | string   | Branch                      |
| Code                      | string   | Code                        |
| Contact                   | string   | Contact                     |
| ContactAddress            | string   | Contact Address             |
| ContactEmail              | string   | Contact Email               |
| ContactIdentifiedNumber   | string   | Contact Identified Number   |
| ContactName               | string   | Contact Name                |
| ContactPhone              | string   | Contact Phone               |
| Creator                   | string   | Creator                     |
| DateOfCreate              | datetime | Date Of Create              |
| DateOfPurchase            | datetime | Date Of Purchase            |
| DateOfReceived            | datetime | Date Of Received            |
| DeliveryAddress           | string   | Delivery Address            |
| DirectReceiverName        | string   | Direct Receiver Name        |
| GoodsReceiptNote          | string   | Goods Receipt Note          |
| Id                        | numeric  | Id                          |
| IncludeInvoice            | boolean  | Include Invoice             |
| InventoryReceivingVoucher | string   | Inventory Receiving Voucher |
| Invoice                   | string   | Invoice                     |
| InvoiceDate               | string   | Invoice Date                |
| InvoiceNumber             | string   | Invoice Number              |
| InvoiceStatus             | string   | Invoice Status              |
| InvoiceSymbol             | string   | Invoice Symbol              |
| InvoiceTemplate           | string   | Invoice Template            |
| IsPayment                 | numeric  | Is Payment                  |
| Note                      | string   | Note                        |
| Object                    | string   | Object                      |
| ObjectAddress             | string   | Object Address              |
| ObjectBankCode            | string   | Object Bank Code            |
| ObjectBankName            | string   | Object Bank Name            |
| ObjectEmail               | string   | Object Email                |
| ObjectName                | string   | Object Name                 |
| ObjectPhone               | string   | Object Phone                |
| ObjectTaxCode             | string   | Object Tax Code             |
| OrderVoucher              | string   | Order Voucher               |
| PaymentVoucher            | string   | Payment Voucher             |
| Permission                | string   | Permission                  |
| PriceTable                | string   | Price Table                 |
| PurchaseCost              | string   | Purchase Cost               |
| PurchaseStaff             | string   | Purchase Staff              |
| RelativeDeliveryVoucher   | string   | Relative Delivery Voucher   |
| RelativeVouchers          | string   | Relative Vouchers           |
| State                     | string   | State                       |
| SubNote                   | string   | Sub Note                    |
| Tax                       | string   | Tax                         |
| Thread                    | string   | Thread                      |
| Title                     | string   | Title                       |
| TotalMoney                | string   | Total Money                 |
| Type                      | string   | Type                        |
| Warehouse                 | string   | Warehouse                   |

#### GET

**Description: Get item or list paging by offset and limit parameters**

**Endpoint(s):**

* `GET /v4/purchase/vouchers/{Code}`: for get exacly item
* `GET /v4/purchase/vouchers`: for get multiple items

**Parameters:**

* `token`: authentication token (Type: `string`)
* `offset`: get items from offset (Type: `int`)
* `limit`: get number of items (Type: `int`)
* `id<no>`: type is string and start from 0 for get one or more special items, id maybe end of enpoint / (Type: `string`)
* `filter_<Field>`: filter items by like value (Type: `string`)
* `left_<Field>`: filter items by like left of value (Type: `string`)
* `right_<Field>`: filter items by like right of value (Type: `string`)
* `eq_<Field>`: filter items by equal value (Type: `string`)
* `ne_<Field>`: filter items by not equal value (Type: `string`)
* `lt_<Field>`: filter items by less than value (Type: `string`)
* `le_<Field>`: filter items by less than or equal value (Type: `string`)
* `gt_<Field>`: filter items by greater then value (Type: `string`)
* `ge_<Field>`: filter items by greater than or equal value (Type: `string`)

#### POST

**Description: Create new items**

**Endpoint: `POST /v4/purchase/vouchers`**

**Payload:**

* Content-Type: `application/json`
* Data: JSON Array of objects defined in Schema

#### PUT

**Description: Update items by ids**

* `PUT /v4/purchase/vouchers/{Code}`: for put exacly item
* `PUT /v4/purchase/vouchers`: for put multiple items

**Payload:**

* Content-Type: `application/json`
* Data: JSON Array of objects defined in Schema

#### DELETE

**Description: Delete items by ids**

**Endpoint(s):**

* `DELETE /v4/purchase/vouchers/{Code}`: for delete exacly item
* `DELETE /v4/purchase/vouchers?id0=123&id1=456&...`: for delete multiple items with id0 id1,...

### RESTFul API working with GET, POST, PUT, DELETE / RESTFul API thao tác Lấy (GET), Thêm (POST), Sửa (PUT), Xóa (DELETE) Purchase VoucherDetails

#### Primary Key: `Voucher, SystemUuid`

#### Schema

| Field               | Type         | Description           |
| ------------------- | ------------ | --------------------- |
| Amount              | double       | Amount                |
| Business            | indexobjects | Business              |
| Construction        | string       | Construction          |
| Contract            | string       | Contract              |
| CostClassification  | string       | Cost Classification   |
| CostObject          | string       | Cost Object           |
| CreditAccount       | string       | Credit Account        |
| DebitAccount        | string       | Debit Account         |
| Description         | string       | Description           |
| Id                  | numeric      | Id                    |
| Image               | serialize    | Image                 |
| No                  | numeric      | No                    |
| Price               | double       | Price                 |
| Product             | string       | Product               |
| ProductName         | string       | Product Name          |
| Quantity            | double       | Quantity              |
| RelateDetail        | string       | Relate Detail         |
| SalesOrder          | string       | Sales Order           |
| SuggestedSalesPrice | string       | Suggested Sales Price |
| SystemUuid          | string       | System Uuid           |
| Tax                 | string       | Tax                   |
| ToMoney             | double       | To Money              |
| Type                | string       | Type                  |
| Unit                | string       | Unit                  |
| VatTax              | string       | Vat Tax               |
| Voucher             | string       | Voucher               |
| DateOfPurchase      | datetime     | Date Of Purchase      |
| DateOfCreate        | datetime     | Date Of Create        |

#### GET

**Description: Get item or list paging by offset and limit parameters**

**Endpoint(s):**

* `GET /v4/purchase/voucher-details/{Voucher}-{SystemUuid}`: for get exacly item
* `GET /v4/purchase/voucher-details`: for get multiple items

**Parameters:**

* `token`: authentication token (Type: `string`)
* `offset`: get items from offset (Type: `int`)
* `limit`: get number of items (Type: `int`)
* `id<no>`: type is string and start from 0 for get one or more special items, id maybe end of enpoint / (Type: `string`)
* `filter_<Field>`: filter items by like value (Type: `string`)
* `left_<Field>`: filter items by like left of value (Type: `string`)
* `right_<Field>`: filter items by like right of value (Type: `string`)
* `eq_<Field>`: filter items by equal value (Type: `string`)
* `ne_<Field>`: filter items by not equal value (Type: `string`)
* `lt_<Field>`: filter items by less than value (Type: `string`)
* `le_<Field>`: filter items by less than or equal value (Type: `string`)
* `gt_<Field>`: filter items by greater then value (Type: `string`)
* `ge_<Field>`: filter items by greater than or equal value (Type: `string`)

#### POST

**Description: Create new items**

**Endpoint: `POST /v4/purchase/voucher-details`**

**Payload:**

* Content-Type: `application/json`
* Data: JSON Array of objects defined in Schema

#### PUT

**Description: Update items by ids**

* `PUT /v4/purchase/voucher-details/{Voucher}-{SystemUuid}`: for put exacly item
* `PUT /v4/purchase/voucher-details`: for put multiple items

**Payload:**

* Content-Type: `application/json`
* Data: JSON Array of objects defined in Schema

#### DELETE

**Description: Delete items by ids**

**Endpoint(s):**

* `DELETE /v4/purchase/voucher-details/{Voucher}-{SystemUuid}`: for delete exacly item
* `DELETE /v4/purchase/voucher-details?id0=123&id1=456&...`: for delete multiple items with id0 id1,...

### RESTFul API working with GET, POST, PUT, DELETE / RESTFul API thao tác Lấy (GET), Thêm (POST), Sửa (PUT), Xóa (DELETE) Purchase PriceTables

#### Primary Key: `Code`

#### Schema

| Field              | Type    | Description          |
| ------------------ | ------- | -------------------- |
| AppliedClosingDate | string  | Applied Closing Date |
| AppliedStartDate   | string  | Applied Start Date   |
| Branch             | string  | Branch               |
| Code               | string  | Code                 |
| Contract           | string  | Contract             |
| Created            | string  | Created              |
| Creator            | string  | Creator              |
| DateOfApprove      | string  | Date Of Approve      |
| DateOfCreate       | string  | Date Of Create       |
| DateOfStart        | string  | Date Of Start        |
| Description        | string  | Description          |
| File               | numeric | File                 |
| Id                 | numeric | Id                   |
| InputPriceFormula  | string  | Input Price Formula  |
| IsApprove          | numeric | Is Approve           |
| Supplier           | string  | Supplier             |
| SupplierAddress    | string  | Supplier Address     |
| SupplierEmail      | string  | Supplier Email       |
| SupplierName       | string  | Supplier Name        |
| SupplierPhone      | string  | Supplier Phone       |
| Tax                | string  | Tax                  |
| Title              | string  | Title                |

#### GET

**Description: Get item or list paging by offset and limit parameters**

**Endpoint(s):**

* `GET /v4/purchase/price-tables/{Code}`: for get exacly item
* `GET /v4/purchase/price-tables`: for get multiple items

**Parameters:**

* `token`: authentication token (Type: `string`)
* `offset`: get items from offset (Type: `int`)
* `limit`: get number of items (Type: `int`)
* `id<no>`: type is string and start from 0 for get one or more special items, id maybe end of enpoint / (Type: `string`)
* `filter_<Field>`: filter items by like value (Type: `string`)
* `left_<Field>`: filter items by like left of value (Type: `string`)
* `right_<Field>`: filter items by like right of value (Type: `string`)
* `eq_<Field>`: filter items by equal value (Type: `string`)
* `ne_<Field>`: filter items by not equal value (Type: `string`)
* `lt_<Field>`: filter items by less than value (Type: `string`)
* `le_<Field>`: filter items by less than or equal value (Type: `string`)
* `gt_<Field>`: filter items by greater then value (Type: `string`)
* `ge_<Field>`: filter items by greater than or equal value (Type: `string`)

#### POST

**Description: Create new items**

**Endpoint: `POST /v4/purchase/price-tables`**

**Payload:**

* Content-Type: `application/json`
* Data: JSON Array of objects defined in Schema

#### PUT

**Description: Update items by ids**

* `PUT /v4/purchase/price-tables/{Code}`: for put exacly item
* `PUT /v4/purchase/price-tables`: for put multiple items

**Payload:**

* Content-Type: `application/json`
* Data: JSON Array of objects defined in Schema

#### DELETE

**Description: Delete items by ids**

**Endpoint(s):**

* `DELETE /v4/purchase/price-tables/{Code}`: for delete exacly item
* `DELETE /v4/purchase/price-tables?id0=123&id1=456&...`: for delete multiple items with id0 id1,...

### RESTFul API working with GET, POST, PUT, DELETE / RESTFul API thao tác Lấy (GET), Thêm (POST), Sửa (PUT), Xóa (DELETE) Purchase Products

#### Primary Key: `Id`

#### Schema

| Field            | Type      | Description       |
| ---------------- | --------- | ----------------- |
| Id               | numeric   | Id                |
| LastUpdate       | string    | Last Update       |
| Name             | string    | Name              |
| OriginalName     | string    | Original Name     |
| OriginalSku      | string    | Original Sku      |
| Product          | string    | Product           |
| ReferenceVoucher | string    | Reference Voucher |
| Sku              | string    | Sku               |
| Supplier         | string    | Supplier          |
| SupplierName     | string    | Supplier Name     |
| TaxName          | string    | Tax Name          |
| TaxValue         | string    | Tax Value         |
| Pictures         | serialize | Pictures          |
| FeaturePicture   | serialize | Feature Picture   |

#### GET

**Description: Get item or list paging by offset and limit parameters**

**Endpoint(s):**

* `GET /v4/purchase/products/{Id}`: for get exacly item
* `GET /v4/purchase/products`: for get multiple items

**Parameters:**

* `token`: authentication token (Type: `string`)
* `offset`: get items from offset (Type: `int`)
* `limit`: get number of items (Type: `int`)
* `id<no>`: type is string and start from 0 for get one or more special items, id maybe end of enpoint / (Type: `string`)
* `filter_<Field>`: filter items by like value (Type: `string`)
* `left_<Field>`: filter items by like left of value (Type: `string`)
* `right_<Field>`: filter items by like right of value (Type: `string`)
* `eq_<Field>`: filter items by equal value (Type: `string`)
* `ne_<Field>`: filter items by not equal value (Type: `string`)
* `lt_<Field>`: filter items by less than value (Type: `string`)
* `le_<Field>`: filter items by less than or equal value (Type: `string`)
* `gt_<Field>`: filter items by greater then value (Type: `string`)
* `ge_<Field>`: filter items by greater than or equal value (Type: `string`)

#### POST

**Description: Create new items**

**Endpoint: `POST /v4/purchase/products`**

**Payload:**

* Content-Type: `application/json`
* Data: JSON Array of objects defined in Schema

#### PUT

**Description: Update items by ids**

* `PUT /v4/purchase/products/{Id}`: for put exacly item
* `PUT /v4/purchase/products`: for put multiple items

**Payload:**

* Content-Type: `application/json`
* Data: JSON Array of objects defined in Schema

#### DELETE

**Description: Delete items by ids**

**Endpoint(s):**

* `DELETE /v4/purchase/products/{Id}`: for delete exacly item
* `DELETE /v4/purchase/products?id0=123&id1=456&...`: for delete multiple items with id0 id1,...

### RESTFul API working with GET, POST, PUT, DELETE / RESTFul API thao tác Lấy (GET), Thêm (POST), Sửa (PUT), Xóa (DELETE) Purchase V2 Goods

#### Primary Key: `Code`

#### Schema

| Field                  | Type      | Description                |
| ---------------------- | --------- | -------------------------- |
| Barcode                | string    | Barcode                    |
| Brand                  | string    | Brand                      |
| BrandName              | string    | Brand Name                 |
| Categories             | objects   | Categories                 |
| Code                   | string    | Code                       |
| CostOfGoodsSoldX       | string    | Cost Of Goods Sold X       |
| Created                | datetime  | Created                    |
| Creator                | string    | Creator                    |
| CreatorName            | string    | Creator Name               |
| Description            | string    | Description                |
| ExchangeProduct        | string    | Exchange Product           |
| FeaturePicture         | serialize | Feature Picture            |
| Groups                 | objects   | Groups                     |
| Id                     | numeric   | Id                         |
| IsApprove              | numeric   | Is Approve                 |
| IsRegenerateCode       | numeric   | Is Regenerate Code         |
| IsRegenerateSku        | numeric   | Is Regenerate Sku          |
| IsStopBusiness         | boolean   | Is Stop Business           |
| Keyword                | string    | Keyword                    |
| Keywords               | serialize | Keywords                   |
| LastUpdate             | datetime  | Last Update                |
| LastUpdateBy           | string    | Last Update By             |
| LastUpdateByName       | string    | Last Update By Name        |
| ManualCode             | string    | Manual Code                |
| ManufactureId          | numeric   | Manufacture Id             |
| MarketingPrice         | string    | Marketing Price            |
| Name                   | string    | Name                       |
| OldCode                | string    | Old Code                   |
| OldCode2               | string    | Old Code2                  |
| Page                   | string    | Page                       |
| ParentId               | numeric   | Parent Id                  |
| Permission             | string    | Permission                 |
| PictureId              | string    | Picture Id                 |
| PictureIdBk            | numeric   | Picture Id Bk              |
| Pictures               | serialize | Pictures                   |
| PurchaseCost           | string    | Purchase Cost              |
| PurchasePrice          | string    | Purchase Price             |
| RequireVatTax          | boolean   | Require Vat Tax            |
| Revisions              | string    | Revisions                  |
| SearchRank             | numeric   | Search Rank                |
| Sequence               | numeric   | Sequence                   |
| Sku                    | string    | Sku                        |
| State                  | numeric   | State                      |
| Tags                   | serialize | Tags                       |
| Tax                    | string    | Tax                        |
| TaxName                | string    | Tax Name                   |
| Technical              | string    | Technical                  |
| Type                   | string    | Type                       |
| TypeCode               | string    | Type Code                  |
| UniqueKey              | string    | Unique Key                 |
| UnitRatio              | string    | Unit Ratio                 |
| VatTax                 | string    | Vat Tax                    |
| WarehouseUnit          | string    | Warehouse Unit             |
| WarehouseUnitLabel     | string    | Warehouse Unit Label       |
| AccessNumbers          | serialize | Access Numbers             |
| Inventory              | double    | Inventory                  |
| InventoryCost          | double    | Inventory Cost             |
| IsManageByAccessNumber | boolean   | Is Manage By Access Number |
| IsAutoAdjustInventory  | boolean   | Is Auto Adjust Inventory   |
| IsDefaultPurchase      | boolean   | Is Default Purchase        |
| IsDefaultSales         | boolean   | Is Default Sales           |
| IsExpirationGoods      | boolean   | Is Expiration Goods        |
| LastPurchaseDate       | datetime  | Last Purchase Date         |
| LastPurchasePrice      | double    | Last Purchase Price        |
| Units                  | serialize | Units                      |
| RelativeObjects        | serialize | Relative Objects           |
| RelativeObjectIds      | serialize | Relative Object Ids        |

#### GET

**Description: Get item or list paging by offset and limit parameters**

**Endpoint(s):**

* `GET /v4/purchase/goods/{Code}`: for get exacly item
* `GET /v4/purchase/goods`: for get multiple items

**Parameters:**

* `token`: authentication token (Type: `string`)
* `offset`: get items from offset (Type: `int`)
* `limit`: get number of items (Type: `int`)
* `id<no>`: type is string and start from 0 for get one or more special items, id maybe end of enpoint / (Type: `string`)
* `filter_<Field>`: filter items by like value (Type: `string`)
* `left_<Field>`: filter items by like left of value (Type: `string`)
* `right_<Field>`: filter items by like right of value (Type: `string`)
* `eq_<Field>`: filter items by equal value (Type: `string`)
* `ne_<Field>`: filter items by not equal value (Type: `string`)
* `lt_<Field>`: filter items by less than value (Type: `string`)
* `le_<Field>`: filter items by less than or equal value (Type: `string`)
* `gt_<Field>`: filter items by greater then value (Type: `string`)
* `ge_<Field>`: filter items by greater than or equal value (Type: `string`)

#### POST

**Description: Create new items**

**Endpoint: `POST /v4/purchase/goods`**

**Payload:**

* Content-Type: `application/json`
* Data: JSON Array of objects defined in Schema

#### PUT

**Description: Update items by ids**

* `PUT /v4/purchase/goods/{Code}`: for put exacly item
* `PUT /v4/purchase/goods`: for put multiple items

**Payload:**

* Content-Type: `application/json`
* Data: JSON Array of objects defined in Schema

#### DELETE

**Description: Delete items by ids**

**Endpoint(s):**

* `DELETE /v4/purchase/goods/{Code}`: for delete exacly item
* `DELETE /v4/purchase/goods?id0=123&id1=456&...`: for delete multiple items with id0 id1,...

### RESTFul API working with GET, POST, PUT, DELETE / RESTFul API thao tác Lấy (GET), Thêm (POST), Sửa (PUT), Xóa (DELETE) Purchase V2 Goods

#### Primary Key: `Code`

#### Schema

| Field                  | Type      | Description                |
| ---------------------- | --------- | -------------------------- |
| Barcode                | string    | Barcode                    |
| Brand                  | string    | Brand                      |
| BrandName              | string    | Brand Name                 |
| Categories             | objects   | Categories                 |
| Code                   | string    | Code                       |
| CostOfGoodsSoldX       | string    | Cost Of Goods Sold X       |
| Created                | datetime  | Created                    |
| Creator                | string    | Creator                    |
| CreatorName            | string    | Creator Name               |
| Description            | string    | Description                |
| ExchangeProduct        | string    | Exchange Product           |
| FeaturePicture         | serialize | Feature Picture            |
| Groups                 | objects   | Groups                     |
| Id                     | numeric   | Id                         |
| IsApprove              | numeric   | Is Approve                 |
| IsRegenerateCode       | numeric   | Is Regenerate Code         |
| IsRegenerateSku        | numeric   | Is Regenerate Sku          |
| IsStopBusiness         | boolean   | Is Stop Business           |
| Keyword                | string    | Keyword                    |
| Keywords               | serialize | Keywords                   |
| LastUpdate             | datetime  | Last Update                |
| LastUpdateBy           | string    | Last Update By             |
| LastUpdateByName       | string    | Last Update By Name        |
| ManualCode             | string    | Manual Code                |
| ManufactureId          | numeric   | Manufacture Id             |
| MarketingPrice         | string    | Marketing Price            |
| Name                   | string    | Name                       |
| OldCode                | string    | Old Code                   |
| OldCode2               | string    | Old Code2                  |
| Page                   | string    | Page                       |
| ParentId               | numeric   | Parent Id                  |
| Permission             | string    | Permission                 |
| PictureId              | string    | Picture Id                 |
| PictureIdBk            | numeric   | Picture Id Bk              |
| Pictures               | serialize | Pictures                   |
| PurchaseCost           | string    | Purchase Cost              |
| PurchasePrice          | string    | Purchase Price             |
| RequireVatTax          | boolean   | Require Vat Tax            |
| Revisions              | string    | Revisions                  |
| SearchRank             | numeric   | Search Rank                |
| Sequence               | numeric   | Sequence                   |
| Sku                    | string    | Sku                        |
| State                  | numeric   | State                      |
| Tags                   | serialize | Tags                       |
| Tax                    | string    | Tax                        |
| TaxName                | string    | Tax Name                   |
| Technical              | string    | Technical                  |
| Type                   | string    | Type                       |
| TypeCode               | string    | Type Code                  |
| UniqueKey              | string    | Unique Key                 |
| UnitRatio              | string    | Unit Ratio                 |
| VatTax                 | string    | Vat Tax                    |
| WarehouseUnit          | string    | Warehouse Unit             |
| WarehouseUnitLabel     | string    | Warehouse Unit Label       |
| AccessNumbers          | serialize | Access Numbers             |
| Inventory              | double    | Inventory                  |
| InventoryCost          | double    | Inventory Cost             |
| IsManageByAccessNumber | boolean   | Is Manage By Access Number |
| IsAutoAdjustInventory  | boolean   | Is Auto Adjust Inventory   |
| IsDefaultPurchase      | boolean   | Is Default Purchase        |
| IsDefaultSales         | boolean   | Is Default Sales           |
| IsExpirationGoods      | boolean   | Is Expiration Goods        |
| LastPurchaseDate       | datetime  | Last Purchase Date         |
| LastPurchasePrice      | double    | Last Purchase Price        |
| Units                  | serialize | Units                      |
| RelativeObjects        | serialize | Relative Objects           |
| RelativeObjectIds      | serialize | Relative Object Ids        |

#### GET

**Description: Get item or list paging by offset and limit parameters**

**Endpoint(s):**

* `GET /v4/purchase/purchase-products/{Code}`: for get exacly item
* `GET /v4/purchase/purchase-products`: for get multiple items

**Parameters:**

* `token`: authentication token (Type: `string`)
* `offset`: get items from offset (Type: `int`)
* `limit`: get number of items (Type: `int`)
* `id<no>`: type is string and start from 0 for get one or more special items, id maybe end of enpoint / (Type: `string`)
* `filter_<Field>`: filter items by like value (Type: `string`)
* `left_<Field>`: filter items by like left of value (Type: `string`)
* `right_<Field>`: filter items by like right of value (Type: `string`)
* `eq_<Field>`: filter items by equal value (Type: `string`)
* `ne_<Field>`: filter items by not equal value (Type: `string`)
* `lt_<Field>`: filter items by less than value (Type: `string`)
* `le_<Field>`: filter items by less than or equal value (Type: `string`)
* `gt_<Field>`: filter items by greater then value (Type: `string`)
* `ge_<Field>`: filter items by greater than or equal value (Type: `string`)

#### POST

**Description: Create new items**

**Endpoint: `POST /v4/purchase/purchase-products`**

**Payload:**

* Content-Type: `application/json`
* Data: JSON Array of objects defined in Schema

#### PUT

**Description: Update items by ids**

* `PUT /v4/purchase/purchase-products/{Code}`: for put exacly item
* `PUT /v4/purchase/purchase-products`: for put multiple items

**Payload:**

* Content-Type: `application/json`
* Data: JSON Array of objects defined in Schema

#### DELETE

**Description: Delete items by ids**

**Endpoint(s):**

* `DELETE /v4/purchase/purchase-products/{Code}`: for delete exacly item
* `DELETE /v4/purchase/purchase-products?id0=123&id1=456&...`: for delete multiple items with id0 id1,...

### RESTFul API working with GET, POST, PUT, DELETE / RESTFul API thao tác Lấy (GET), Thêm (POST), Sửa (PUT), Xóa (DELETE) Purchase MultifunctionalPurchases

#### Primary Key: `Code`

#### Schema

| Field               | Type     | Description            |
| ------------------- | -------- | ---------------------- |
| Amount              | double   | Amount                 |
| Approver            | string   | Approver               |
| ApproverName        | string   | Approver Name          |
| Code                | string   | Code                   |
| Creator             | string   | Creator                |
| CreatorName         | string   | Creator Name           |
| DateOfApproved      | datetime | Date Of Approved       |
| DateOfCreated       | datetime | Date Of Created        |
| DateOfGoodsRececipt | datetime | Date Of Goods Rececipt |
| DateOfPurchase      | datetime | Date Of Purchase       |
| Id                  | numeric  | Id                     |
| Note                | string   | Note                   |
| Permission          | string   | Permission             |
| State               | string   | State                  |
| SubNote             | string   | Sub Note               |
| Thread              | string   | Thread                 |
| Title               | string   | Title                  |

#### GET

**Description: Get item or list paging by offset and limit parameters**

**Endpoint(s):**

* `GET /v4/purchase/multifunctional-purchases/{Code}`: for get exacly item
* `GET /v4/purchase/multifunctional-purchases`: for get multiple items

**Parameters:**

* `token`: authentication token (Type: `string`)
* `offset`: get items from offset (Type: `int`)
* `limit`: get number of items (Type: `int`)
* `id<no>`: type is string and start from 0 for get one or more special items, id maybe end of enpoint / (Type: `string`)
* `filter_<Field>`: filter items by like value (Type: `string`)
* `left_<Field>`: filter items by like left of value (Type: `string`)
* `right_<Field>`: filter items by like right of value (Type: `string`)
* `eq_<Field>`: filter items by equal value (Type: `string`)
* `ne_<Field>`: filter items by not equal value (Type: `string`)
* `lt_<Field>`: filter items by less than value (Type: `string`)
* `le_<Field>`: filter items by less than or equal value (Type: `string`)
* `gt_<Field>`: filter items by greater then value (Type: `string`)
* `ge_<Field>`: filter items by greater than or equal value (Type: `string`)

#### POST

**Description: Create new items**

**Endpoint: `POST /v4/purchase/multifunctional-purchases`**

**Payload:**

* Content-Type: `application/json`
* Data: JSON Array of objects defined in Schema

#### PUT

**Description: Update items by ids**

* `PUT /v4/purchase/multifunctional-purchases/{Code}`: for put exacly item
* `PUT /v4/purchase/multifunctional-purchases`: for put multiple items

**Payload:**

* Content-Type: `application/json`
* Data: JSON Array of objects defined in Schema

#### DELETE

**Description: Delete items by ids**

**Endpoint(s):**

* `DELETE /v4/purchase/multifunctional-purchases/{Code}`: for delete exacly item
* `DELETE /v4/purchase/multifunctional-purchases?id0=123&id1=456&...`: for delete multiple items with id0 id1,...
