ARDocManagement

GraphViz

Schema

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"
        }
      }
    }
  }
}

Custom Operations

OPERATION

VERB

PATH

RETURNS

Description

calculate

POST

/invoice/calculate

correcting

GET

/invoice/correcting

corrected

GET

/invoice/corrected

correct

POST

/invoice/correct

calculate

HTTP Request

POST /aps/2/resources/{aps-id}/invoice/calculate

Description

Parameters

PARAMETER

TYPE

DESCRIPTION

correctingTransaction

CorrectingTransaction

Returns

correcting

HTTP Request

GET /aps/2/resources/{aps-id}/invoice/correcting

Description

Parameters

PARAMETER

TYPE

DESCRIPTION

detId

String

Returns

corrected

HTTP Request

GET /aps/2/resources/{aps-id}/invoice/corrected

Description

Parameters

PARAMETER

TYPE

DESCRIPTION

detId

String

Returns

correct

HTTP Request

POST /aps/2/resources/{aps-id}/invoice/correct

Description

Parameters

PARAMETER

TYPE

DESCRIPTION

correctingTransaction

CorrectingTransaction

Returns

Structures

Currency

Basic currency structure.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

value

String

Not Required

Amount.

code

String

Not Required

Currency Code

CorrectingTransactionResult

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

detailId

Integer

Not Required

extendedPrice

Currency

Not Required

extraTax

Currency

Not Required

total

Currency

Not Required

CorrectingTransactionLine

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

detailId

Integer

Not Required

amount

Currency

Not Required

CorrectingTransaction

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

reason

String

Not Required

lines

Array of CorrectingTransactionLine

Not Required

Correction

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

detailId

Integer

Not Required

correctedDetailId

Integer

Not Required

documentNumber

String

Not Required

documentType

MLString

Not Required

reason

String

Not Required

description

String

Not Required

currentExtendedPrice

Currency

Not Required

originalExtendedPrice

Currency

Not Required

currentTax

Currency

Not Required

originalTax

Currency

Not Required

currentTotal

Currency

Not Required

originalTotal

Currency

Not Required

Examples

Since the considered APS type contains custom operations, refer to Custom Operations for the general explanation of their structure and examples of operation calls.