Change Log

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

Contributors:

Adam Wilson - Logo Pogo

CRM Order Lines API

Create, Retrieve, Update and Delete CRM Order Lines within an Order via the public API endpoint.

POST CRM Order Line Create

Creates a new Order Line item based on the provided data.

/api/v2/admin/orders/{id}/order-lines

Data / Response:

{
  "ProductId": 0,
  "ProductName": "string",
  "Quantity": 0,
  "UnitPrice": 0,
  "Attributes": [
    {
      "AttributeId": 0,
      "OptionsIds": [
        "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
    }
  }
}

GET CRM Order Line Item

Retrieves a single Order Line based on the ID passed in the endpoint URL.

/api/v2/admin/orders/order-lines/{id}

Data / Response:

N/A
{
  "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"
      ]
    }
  ]
}

PUT CRM Order Line Update

Updates a single Order Line based on the ID passed in the endpoint URL and data provided.

/api/v2/admin/orders/order-lines/{id}

Data / Response:

{
  "Id": 0,
  "ProductId": "string",
  "ProductName": "string",
  "Quantity": 0,
  "UnitPrice": 0
}
{
  "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
    }
  }
}

DELETE CRM Order Line Delete

Deletes a single Order Line based on the ID passed in the endpoint URL.

/api/v2/admin/orders/order-lines/{id}

Data / Response:

N/A
Status 204