| POST,OPTIONS | /v1/projects/{ProjectID}/purchase-orders/{PurchaseOrderID}/receive |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ProjectID | path | int | No | |
| PurchaseOrderID | path | int | No | |
| Lines | body | List<PurchaseOrderLine> | No | |
| Close | body | bool | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| PurchaseOrderLineID | form | int | No | |
| PurchaseOrderID | form | int | No | |
| MaterialID | form | int? | No | |
| Description | form | string | No | |
| Unit | form | string | No | |
| Qty | form | decimal | No | |
| UnitPrice | form | decimal | No | |
| QtyReceived | form | decimal | No | |
| CostCode | form | string | No | |
| SortOrder | form | int | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ResponseStatus | form | ResponseStatus | No | |
| Order | form | PurchaseOrder | No | |
| Summary | form | PurchaseOrderBuyoutSummary | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| PurchaseOrderID | form | int | No | |
| PurchaseOrderUID | form | Guid | No | |
| ProjectID | form | int | No | |
| PONumber | form | string | No | |
| Vendor | form | string | No | |
| Status | form | string | No | |
| AmountUSD | form | decimal | No | |
| CostCode | form | string | No | |
| NeedByDate | form | DateTime? | No | |
| Notes | form | string | No | |
| IssuedAt | form | DateTime? | No | |
| ReceivedAt | form | DateTime? | No | |
| CreatedBy | form | string | No | |
| CreatedAt | form | DateTime? | No | |
| UpdatedAt | form | DateTime? | No | |
| LineCount | form | int | No | |
| FirstItem | form | string | No | |
| DaysToNeed | form | int | No | |
| Lines | form | List<PurchaseOrderLine> | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ProjectID | form | int | No | |
| MaterialBudget | form | decimal | No | |
| Committed | form | decimal | No | |
| Received | form | decimal | No | |
| OpenPOs | form | int | No | |
| LatePOs | form | int | No | |
| POCount | form | int | No | |
| RemainingBuyout | form | decimal | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/projects/{ProjectID}/purchase-orders/{PurchaseOrderID}/receive HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"ProjectID":0,"PurchaseOrderID":0,"Lines":[{"PurchaseOrderLineID":0,"PurchaseOrderID":0,"MaterialID":0,"Description":"String","Unit":"String","Qty":0,"UnitPrice":0,"QtyReceived":0,"CostCode":"String","SortOrder":0}],"Close":false}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Order":{"PurchaseOrderID":0,"PurchaseOrderUID":"00000000000000000000000000000000","ProjectID":0,"PONumber":"String","Vendor":"String","Status":"String","AmountUSD":0,"CostCode":"String","NeedByDate":"0001-01-01T00:00:00.0000000","Notes":"String","IssuedAt":"0001-01-01T00:00:00.0000000","ReceivedAt":"0001-01-01T00:00:00.0000000","CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000","LineCount":0,"FirstItem":"String","DaysToNeed":0,"Lines":[{"PurchaseOrderLineID":0,"PurchaseOrderID":0,"MaterialID":0,"Description":"String","Unit":"String","Qty":0,"UnitPrice":0,"QtyReceived":0,"CostCode":"String","SortOrder":0}]},"Summary":{"ProjectID":0,"MaterialBudget":0,"Committed":0,"Received":0,"OpenPOs":0,"LatePOs":0,"POCount":0,"RemainingBuyout":0}}