Show / Hide Table of Contents

    Commands

    In order to interact with the business domain of the Monitor ERP system, the API provides a command interface which hooks right into the business domain.

    Commands are sent to the API using HTTP POST requests with a request body reflecting the command structure described in the reference documentation.

    Types

    In order to cover the most amount of use cases, commands have been split into two types.

    State commands

    The first and most common type of command is a state command. A state command takes input from the API consumer and uses it to affect the state of the business domain.

    An example use case for a state command could be the creation of a customer order or updating extra information values of a product record.

    The return type of a state command is always EntityCommandResponse.

    Calculation commands

    The second type of command is a calculation command. The calculation command takes input from the API consumer and then calculates an output based on the current state of the business domain without affecting it.

    An example of a calculation command would be the calculation of disposable balance for a given date.

    Return types for calculation commands vary depending on the output of the calculation.

    If a calculation command is batchable, it will return EntityCommandResponse as is the case for GetEntity for example.

    If a calculation command returns EntityCommandResponse, it will populate the Data property with the calculated output serialized as JSON.

    Examples

    • Create customer order
    • Create customer via batch
    Back to top Copyright © 2023 Monitor ERP System AB