Change Log

  • 19-Jun-2024 | v7.0.0 | All new article

Contributors:

Adam Wilson - Logo Pogo

CRM Order Assets API

Create CRM Order Assets, such as Discount Codes, Gift Vouchers, Shipping Options and Tax Codes via the public API endpoint.

PUT CRM Order Assets Discount Code Update

Sets a single Discount Code to an Order based on the data provided.

/api/v2/admin/orders/{id}/discount-code

Data / Response:

{
  "DiscountId": "string"
}
{
  "Id": 0,
  "AWBNumber": "string",
  "CurrencyCountry": "string",
  "Currency": "string",
  "Country": "string",
  "InvoiceDate": "2024-05-17T18:47:19.762Z",
  "InvoiceNumber": 0,
  "IsDeleted": true,
  "IsRecurring": true,
  "MainOrderId": 0,
  "MemberId": 0,
  "OrderName": "string",
  "PaymentState": "None",
  "StatusId": 0,
  "TotalCost": 0,
  "CreatedDateTime": "2024-05-17T18:47:19.762Z",
  "HasSubscriptions": true,
  "HasPaidSubscription": true,
  "TrackingURL": "string",
  "TransactionId": "string",
  "AmountPaid": 0,
  "AmountPending": 0,
  "OrderCaseType": "FormCase",
  "StatusShort": {
    "Id": 0,
    "Name": "string"
  },
  "Discount": {
    "Code": "string",
    "Cost": 0
  },
  "GiftVoucher": {
    "Name": "string",
    "Cost": 0
  },
  "Tax": {
    "Code": "string",
    "Rate": 0
  },
  "ShippingInfo": {
    "Name": "string",
    "Cost": 0,
    "Address": "string",
    "City": "string",
    "State": "string",
    "Zipcode": "string",
    "Country": "string"
  },
  "Member": {
    "Id": 0,
    "Email": "string",
    "FirstName": "string",
    "LastName": "string"
  },
  "OrderLines": [
    {
      "Id": 0,
      "EntityType": "Form",
      "ProductId": 0,
      "ModuleId": 0,
      "ProductName": "string",
      "Quantity": 0,
      "TaxRate": 0,
      "UnitPrice": 0,
      "TotalPrice": 0,
      "FileName": "string",
      "IsDownload": true,
      "Attributes": [
        {
          "AttributeId": 0,
          "OptionsIds": [
            "string"
          ]
        }
      ]
    }
  ],
  "Payments": [
    {
      "Id": 0,
      "Amount": 0,
      "AmountCaptured": 0,
      "GatewayReason": "string",
      "TransactionId": "string",
      "Status": "string",
      "PaymentType": "CreditCard",
      "PaymentGatewayType": "stripe",
      "Notes": "string",
      "CreatedDateTime": "2024-05-17T18:47:19.762Z"
    }
  ],
  "CustomCrmGroups": {
    "<GroupAlias1>": {
      "<FieldAlias1>": "<value>",
      "<FieldAlias2>": false,
      "<FieldAlias3>": 0
    }
  }
}

PUT CRM Order Assets Gift Voucher Update

Sets a single Gift Voucher to an Order based on the data provided.

/api/v2/admin/orders/{id}/gift-voucher

Data / Response:

{
  "GiftVoucherId": "string"
}
{
  "Id": 0,
  "AWBNumber": "string",
  "CurrencyCountry": "string",
  "Currency": "string",
  "Country": "string",
  "InvoiceDate": "2024-05-17T18:47:19.762Z",
  "InvoiceNumber": 0,
  "IsDeleted": true,
  "IsRecurring": true,
  "MainOrderId": 0,
  "MemberId": 0,
  "OrderName": "string",
  "PaymentState": "None",
  "StatusId": 0,
  "TotalCost": 0,
  "CreatedDateTime": "2024-05-17T18:47:19.762Z",
  "HasSubscriptions": true,
  "HasPaidSubscription": true,
  "TrackingURL": "string",
  "TransactionId": "string",
  "AmountPaid": 0,
  "AmountPending": 0,
  "OrderCaseType": "FormCase",
  "StatusShort": {
    "Id": 0,
    "Name": "string"
  },
  "Discount": {
    "Code": "string",
    "Cost": 0
  },
  "GiftVoucher": {
    "Name": "string",
    "Cost": 0
  },
  "Tax": {
    "Code": "string",
    "Rate": 0
  },
  "ShippingInfo": {
    "Name": "string",
    "Cost": 0,
    "Address": "string",
    "City": "string",
    "State": "string",
    "Zipcode": "string",
    "Country": "string"
  },
  "Member": {
    "Id": 0,
    "Email": "string",
    "FirstName": "string",
    "LastName": "string"
  },
  "OrderLines": [
    {
      "Id": 0,
      "EntityType": "Form",
      "ProductId": 0,
      "ModuleId": 0,
      "ProductName": "string",
      "Quantity": 0,
      "TaxRate": 0,
      "UnitPrice": 0,
      "TotalPrice": 0,
      "FileName": "string",
      "IsDownload": true,
      "Attributes": [
        {
          "AttributeId": 0,
          "OptionsIds": [
            "string"
          ]
        }
      ]
    }
  ],
  "Payments": [
    {
      "Id": 0,
      "Amount": 0,
      "AmountCaptured": 0,
      "GatewayReason": "string",
      "TransactionId": "string",
      "Status": "string",
      "PaymentType": "CreditCard",
      "PaymentGatewayType": "stripe",
      "Notes": "string",
      "CreatedDateTime": "2024-05-17T18:47:19.762Z"
    }
  ],
  "CustomCrmGroups": {
    "<GroupAlias1>": {
      "<FieldAlias1>": "<value>",
      "<FieldAlias2>": false,
      "<FieldAlias3>": 0
    }
  }
}

PUT CRM Order Assets Shipping Option Update

Sets a single Shipping Option to an Order based on the data provided.

/api/v2/admin/orders/{id}/shipping

Data / Response:

{
  "ShippingOptionId": "string"
}
{
  "Id": 0,
  "AWBNumber": "string",
  "CurrencyCountry": "string",
  "Currency": "string",
  "Country": "string",
  "InvoiceDate": "2024-05-17T18:47:19.762Z",
  "InvoiceNumber": 0,
  "IsDeleted": true,
  "IsRecurring": true,
  "MainOrderId": 0,
  "MemberId": 0,
  "OrderName": "string",
  "PaymentState": "None",
  "StatusId": 0,
  "TotalCost": 0,
  "CreatedDateTime": "2024-05-17T18:47:19.762Z",
  "HasSubscriptions": true,
  "HasPaidSubscription": true,
  "TrackingURL": "string",
  "TransactionId": "string",
  "AmountPaid": 0,
  "AmountPending": 0,
  "OrderCaseType": "FormCase",
  "StatusShort": {
    "Id": 0,
    "Name": "string"
  },
  "Discount": {
    "Code": "string",
    "Cost": 0
  },
  "GiftVoucher": {
    "Name": "string",
    "Cost": 0
  },
  "Tax": {
    "Code": "string",
    "Rate": 0
  },
  "ShippingInfo": {
    "Name": "string",
    "Cost": 0,
    "Address": "string",
    "City": "string",
    "State": "string",
    "Zipcode": "string",
    "Country": "string"
  },
  "Member": {
    "Id": 0,
    "Email": "string",
    "FirstName": "string",
    "LastName": "string"
  },
  "OrderLines": [
    {
      "Id": 0,
      "EntityType": "Form",
      "ProductId": 0,
      "ModuleId": 0,
      "ProductName": "string",
      "Quantity": 0,
      "TaxRate": 0,
      "UnitPrice": 0,
      "TotalPrice": 0,
      "FileName": "string",
      "IsDownload": true,
      "Attributes": [
        {
          "AttributeId": 0,
          "OptionsIds": [
            "string"
          ]
        }
      ]
    }
  ],
  "Payments": [
    {
      "Id": 0,
      "Amount": 0,
      "AmountCaptured": 0,
      "GatewayReason": "string",
      "TransactionId": "string",
      "Status": "string",
      "PaymentType": "CreditCard",
      "PaymentGatewayType": "stripe",
      "Notes": "string",
      "CreatedDateTime": "2024-05-17T18:47:19.762Z"
    }
  ],
  "CustomCrmGroups": {
    "<GroupAlias1>": {
      "<FieldAlias1>": "<value>",
      "<FieldAlias2>": false,
      "<FieldAlias3>": 0
    }
  }
}

PUT CRM Order Assets Tax Code Update

Sets a single Tax Code to an Order based on the data provided.

/api/v2/admin/orders/{id}/tax

Data / Response:

{
  "TaxId": "string"
}
{
  "Id": 0,
  "AWBNumber": "string",
  "CurrencyCountry": "string",
  "Currency": "string",
  "Country": "string",
  "InvoiceDate": "2024-05-17T18:47:19.762Z",
  "InvoiceNumber": 0,
  "IsDeleted": true,
  "IsRecurring": true,
  "MainOrderId": 0,
  "MemberId": 0,
  "OrderName": "string",
  "PaymentState": "None",
  "StatusId": 0,
  "TotalCost": 0,
  "CreatedDateTime": "2024-05-17T18:47:19.762Z",
  "HasSubscriptions": true,
  "HasPaidSubscription": true,
  "TrackingURL": "string",
  "TransactionId": "string",
  "AmountPaid": 0,
  "AmountPending": 0,
  "OrderCaseType": "FormCase",
  "StatusShort": {
    "Id": 0,
    "Name": "string"
  },
  "Discount": {
    "Code": "string",
    "Cost": 0
  },
  "GiftVoucher": {
    "Name": "string",
    "Cost": 0
  },
  "Tax": {
    "Code": "string",
    "Rate": 0
  },
  "ShippingInfo": {
    "Name": "string",
    "Cost": 0,
    "Address": "string",
    "City": "string",
    "State": "string",
    "Zipcode": "string",
    "Country": "string"
  },
  "Member": {
    "Id": 0,
    "Email": "string",
    "FirstName": "string",
    "LastName": "string"
  },
  "OrderLines": [
    {
      "Id": 0,
      "EntityType": "Form",
      "ProductId": 0,
      "ModuleId": 0,
      "ProductName": "string",
      "Quantity": 0,
      "TaxRate": 0,
      "UnitPrice": 0,
      "TotalPrice": 0,
      "FileName": "string",
      "IsDownload": true,
      "Attributes": [
        {
          "AttributeId": 0,
          "OptionsIds": [
            "string"
          ]
        }
      ]
    }
  ],
  "Payments": [
    {
      "Id": 0,
      "Amount": 0,
      "AmountCaptured": 0,
      "GatewayReason": "string",
      "TransactionId": "string",
      "Status": "string",
      "PaymentType": "CreditCard",
      "PaymentGatewayType": "stripe",
      "Notes": "string",
      "CreatedDateTime": "2024-05-17T18:47:19.762Z"
    }
  ],
  "CustomCrmGroups": {
    "<GroupAlias1>": {
      "<FieldAlias1>": "<value>",
      "<FieldAlias2>": false,
      "<FieldAlias3>": 0
    }
  }
}