Description
Creates a new location quantity allocation for an existing supplier order line. The caller must supply either a location code or a location ID — one of the two is required. If the location is already allocated to the given supplier order line, or if the location cannot be resolved, an error is returned and no record is created.
Request Parameters
# |
Name |
Type |
Required |
Example |
Description |
1 |
AppName |
string |
1 |
MyApp |
Name of the application executing the API call. |
2 |
UserId |
int |
0 |
42 |
ID of the user executing the API call. Either UserId or UserName must be provided. |
3 |
UserName |
string |
1 |
jsmith |
Username of the user executing the API call. Either UserId or UserName must be provided. |
4 |
SupplierOrderLineId |
int |
1 |
131 |
ID of the supplier order line to allocate the quantity to. |
5 |
Location |
string |
0 |
W01 |
Location code. Either Location or LocationId must be provided. |
6 |
LocationId |
int |
0 |
5 |
Location ID. Either Location or LocationId must be provided. |
7 |
Qty |
int |
1 |
10 |
Quantity to allocate to the location. Must be a positive integer. |
8 |
ConsiderPackageUnits |
bit |
0 |
0 |
Apply packing units to the quantity. 0 = no (default), 1 = yes. |
9 |
ConsiderMinOrderQty |
bit |
0 |
0 |
Apply minimum order quantity rules. 0 = no (default), 1 = yes. |
Request body
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dem="https://api.pixi.eu/soap/demosandbox/">
<soapenv:Header/>
<soapenv:Body>
<dem:pixiSupplierOrderLineLocQtyCreate>
<dem:AppName>MyApp</dem:AppName>
<dem:UserId>42</dem:UserId>
<dem:UserName>jsmith</dem:UserName>
<dem:SupplierOrderLineId>131</dem:SupplierOrderLineId>
<dem:Location>W01</dem:Location>
<dem:LocationId>5</dem:LocationId>
<dem:Qty>10</dem:Qty>
<dem:ConsiderPackageUnits>0</dem:ConsiderPackageUnits>
<dem:ConsiderMinOrderQty>0</dem:ConsiderMinOrderQty>
</dem:pixiSupplierOrderLineLocQtyCreate>
</soapenv:Body>
</soapenv:Envelope>Response
Body 1: Created Record
Returned on success.
# |
Name |
Type |
Description |
1 |
Id |
int |
ID of the newly created location quantity record. |
Body 2: Error Information
Returned instead of Body 1 when the operation fails.
# |
Name |
Type |
Description |
1 |
ReturnCode |
string |
Always "ERROR" on failure. |
2 |
ErrorMessage |
string |
Description of the error. See Additional Notes for possible values. |
Additional Notes
Either Location or LocationId must be provided — both are optional individually but at least one is required.
Either UserId or UserName must be provided.
Possible error responses (Body 2):
- "Location already exists for sent location."
A location quantity record for this location already exists on the supplier order line.
- "Match value for parameter Location does not exists in db."
The provided Location code or LocationId could not be resolved to a known location.
- SQL exception message
An unexpected error occurred during execution.