{
    "additionalProperties": true,
    "definitions": {},
    "description": "calculate_order_v1",
    "links": [
        {
            "description": "calculate_order_v1",
            "href": "/calculate_order_v1",
            "method": "post",
            "rel": "instances",
            "schema": {
                "allOf": [
                    {
                        "properties": {
                            "action": {
                                "description": "Action Name name",
                                "example": "catalog_get_config",
                                "type": "string"
                            },
                            "client_id": {
                                "description": "RetailOPS client id",
                                "example": 497,
                                "type": "integer"
                            },
                            "integration_auth_token": {
                                "description": "Randomly generated authorization token, for authenticating genuine RetailOps- originated requests.",
                                "example": "2KuxqV9rsAtAM78i47CITMvtnflUapNmgGJAvWiHqgUrk1xkeDNWlM3EsrmJEtmV",
                                "type": "string"
                            },
                            "version": {
                                "description": "Action Version",
                                "example": 1,
                                "type": "integer"
                            }
                        },
                        "required": [
                            "action",
                            "version",
                            "client_id"
                        ],
                        "type": "object"
                    },
                    {
                        "properties": {
                            "order": {
                                "properties": {
                                    "effective_date": {
                                        "format": "date-time",
                                        "type": "string"
                                    },
                                    "grand_total": {
                                        "description": "RetailOps current order grand total",
                                        "type": "number"
                                    },
                                    "items": {
                                        "properties": {
                                            "discount_amt": {
                                                "type": "number"
                                            },
                                            "discount_pct": {
                                                "type": "number"
                                            },
                                            "effective_unit_price": {
                                                "description": "effective unit price associated with the order item (after discounts), specified in the nexus currency usually the same as counterparty currency)",
                                                "type": "number"
                                            },
                                            "product_classification": {
                                                "description": "Designated product classification attribute value for this module",
                                                "type": "string"
                                            },
                                            "quantity": {
                                                "description": "quantity of the order item",
                                                "type": "integer"
                                            },
                                            "retailops_item_id": {
                                                "description": "RetailOps unique item identifier",
                                                "type": "string"
                                            },
                                            "sku": {
                                                "description": "SKU specified by the order item",
                                                "type": "string"
                                            },
                                            "unit_price": {
                                                "description": "effective unit price associated with the order item (after discounts), specified in the nexus currency (usually the same as counterparty currency)",
                                                "type": "number"
                                            }
                                        },
                                        "type": "object"
                                    },
                                    "retailops_order_id": {
                                        "description": "RetailOps Order ID",
                                        "type": "integer"
                                    },
                                    "shipping_address": {
                                        "properties": {
                                            "address1": {
                                                "description": "Address line one",
                                                "example": "123 Main St",
                                                "type": "string"
                                            },
                                            "address2": {
                                                "description": "Address second line",
                                                "example": "suite 100",
                                                "type": "string"
                                            },
                                            "city": {
                                                "description": "City",
                                                "example": "San Diego",
                                                "type": "string"
                                            },
                                            "company": {
                                                "description": "Company name",
                                                "example": "gudTECH",
                                                "type": "string"
                                            },
                                            "country": {
                                                "description": "Country",
                                                "example": "US United States",
                                                "type": "string"
                                            },
                                            "first_name": {
                                                "description": "First Name",
                                                "example": "John",
                                                "type": "string"
                                            },
                                            "last_name": {
                                                "description": "Last Name",
                                                "example": "Smith",
                                                "type": "string"
                                            },
                                            "postal_code": {
                                                "description": "Postal Code",
                                                "example": "92101",
                                                "type": "string"
                                            },
                                            "state": {
                                                "description": "state",
                                                "example": "CA",
                                                "type": "string"
                                            }
                                        },
                                        "type": "object"
                                    },
                                    "shipping_amt": {
                                        "type": "number"
                                    }
                                },
                                "type": "object"
                            }
                        },
                        "required": [
                            "order"
                        ],
                        "type": "object"
                    }
                ]
            },
            "targetSchema": {
                "properties": {
                    "events": {
                        "items": {
                            "description": "event returned in action response",
                            "properties": {
                                "associations": {
                                    "description": "",
                                    "items": {
                                        "properties": {
                                            "identifier": {
                                                "description": "identify value corresponding to the type",
                                                "example": "S1234",
                                                "type": "string"
                                            },
                                            "identifier_type": {
                                                "description": "Type of identifier being provided",
                                                "enum": [
                                                    "order_id",
                                                    "order_refnum",
                                                    "orderitem_id",
                                                    "orderitem_refnum",
                                                    "shipment_id",
                                                    "shipmentitem_id",
                                                    "product_id",
                                                    "sku_number"
                                                ],
                                                "example": "sku_number",
                                                "type": "string"
                                            }
                                        },
                                        "type": "object"
                                    },
                                    "type": [
                                        "array",
                                        "null"
                                    ]
                                },
                                "code": {
                                    "description": "error/warning code",
                                    "example": "ERR1234",
                                    "type": "string"
                                },
                                "diagnostic_data": {
                                    "description": "",
                                    "type": "string"
                                },
                                "event_type": {
                                    "description": "event type",
                                    "enum": [
                                        "error",
                                        "warning",
                                        "info"
                                    ],
                                    "example": "error",
                                    "type": "string"
                                },
                                "message": {
                                    "description": "descriptive error/warning message",
                                    "example": "Example error message",
                                    "type": "string"
                                }
                            },
                            "type": "object"
                        },
                        "type": [
                            "array",
                            "null"
                        ]
                    },
                    "order": {
                        "properties": {
                            "items": {
                                "properties": {
                                    "retailops_item_id": {
                                        "description": "RetailOps unique item identifier",
                                        "type": "string"
                                    },
                                    "unit_tax_amt": {
                                        "type": "number"
                                    },
                                    "unit_tax_pct": {
                                        "type": "number"
                                    }
                                },
                                "type": "object"
                            },
                            "retailops_order_id": {
                                "description": "RetailOps Order ID",
                                "type": "integer"
                            },
                            "shipping_tax_amt": {
                                "type": "number"
                            },
                            "shipping_tax_pct": {
                                "type": "number"
                            },
                            "total_tax_amt": {
                                "type": "number"
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "title": "/calculate_order_v1"
        }
    ],
    "properties": {},
    "stability": "draft",
    "title": "/calculate_order_v1",
    "type": "object"
}