In this document:
The considered APS type (download
)
extends the Resource APS type(s) and looks as follows:
{
"name": "ARDocManagement",
"id": "http://ingrammicro.com/cb/ardoc-management/1.0",
"apsVersion": "2.0",
"implements": [
"http://aps-standard.org/types/core/resource/1.0"
],
"access": {
"public": true
},
"operations": {
"calculate": {
"path": "invoice/calculate",
"verb": "POST",
"response": {
"type": "array",
"items": {
"type": "CorrectingTransactionResult"
}
},
"errorResponse": {
"type": "object"
},
"parameters": {
"correctingTransaction": {
"kind": "body",
"type": "CorrectingTransaction"
}
}
},
"correcting": {
"path": "invoice/correcting",
"verb": "GET",
"response": {
"type": "array",
"items": {
"type": "Correction"
}
},
"errorResponse": {
"type": "object"
},
"parameters": {
"detId": {
"kind": "query",
"type": "string"
}
}
},
"corrected": {
"path": "invoice/corrected",
"verb": "GET",
"response": {
"type": "array",
"items": {
"type": "Correction"
}
},
"errorResponse": {
"type": "object"
},
"parameters": {
"detId": {
"kind": "query",
"type": "string"
}
}
},
"correct": {
"path": "invoice/correct",
"verb": "POST",
"errorResponse": {
"type": "object"
},
"parameters": {
"correctingTransaction": {
"kind": "body",
"type": "CorrectingTransaction"
}
}
}
},
"structures": {
"Currency": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"code": {
"type": "string"
}
}
},
"CorrectingTransactionResult": {
"type": "object",
"properties": {
"detailId": {
"type": "integer"
},
"extendedPrice": {
"type": "Currency"
},
"extraTax": {
"type": "Currency"
},
"total": {
"type": "Currency"
}
}
},
"CorrectingTransactionLine": {
"type": "object",
"properties": {
"detailId": {
"type": "integer"
},
"amount": {
"type": "Currency"
}
}
},
"CorrectingTransaction": {
"type": "object",
"properties": {
"reason": {
"type": "string"
},
"lines": {
"type": "array",
"items": {
"type": "CorrectingTransactionLine"
}
}
}
},
"Correction": {
"type": "object",
"properties": {
"detailId": {
"type": "integer"
},
"correctedDetailId": {
"type": "integer"
},
"documentNumber": {
"type": "string"
},
"documentType": {
"type": "MLString"
},
"reason": {
"type": "string"
},
"description": {
"type": "string"
},
"currentExtendedPrice": {
"type": "Currency"
},
"originalExtendedPrice": {
"type": "Currency"
},
"currentTax": {
"type": "Currency"
},
"originalTax": {
"type": "Currency"
},
"currentTotal": {
"type": "Currency"
},
"originalTotal": {
"type": "Currency"
}
}
}
}
}
OPERATION |
VERB |
PATH |
RETURNS |
Description |
---|---|---|---|---|
POST |
/invoice/calculate |
|||
GET |
/invoice/correcting |
|||
GET |
/invoice/corrected |
|||
POST |
/invoice/correct |
HTTP Request
POST /aps/2/resources/{aps-id}/invoice/calculate
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
correctingTransaction |
Returns
HTTP Request
GET /aps/2/resources/{aps-id}/invoice/correcting
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
detId |
String |
Returns
HTTP Request
GET /aps/2/resources/{aps-id}/invoice/corrected
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
detId |
String |
Returns
HTTP Request
POST /aps/2/resources/{aps-id}/invoice/correct
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
correctingTransaction |
Returns
Basic currency structure.
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
value |
String |
Not Required |
Amount. |
|
code |
String |
Not Required |
Currency Code |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
detailId |
Integer |
Not Required |
||
extendedPrice |
Not Required |
|||
extraTax |
Not Required |
|||
total |
Not Required |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
detailId |
Integer |
Not Required |
||
amount |
Not Required |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
reason |
String |
Not Required |
||
lines |
Array of CorrectingTransactionLine |
Not Required |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
detailId |
Integer |
Not Required |
||
correctedDetailId |
Integer |
Not Required |
||
documentNumber |
String |
Not Required |
||
documentType |
Not Required |
|||
reason |
String |
Not Required |
||
description |
String |
Not Required |
||
currentExtendedPrice |
Not Required |
|||
originalExtendedPrice |
Not Required |
|||
currentTax |
Not Required |
|||
originalTax |
Not Required |
|||
currentTotal |
Not Required |
|||
originalTotal |
Not Required |
Since the considered APS type contains custom operations, refer to Custom Operations for the general explanation of their structure and examples of operation calls.