Api/Accounts

From RPM Wiki

Table of contents

Summary

API: Get a list of accounts by supplier or customer

Request

/Accounts

{
  "Key":"{api key}",
  "Supplier":"{supplier name}"
}

Or

{
  "Key":"{api key}",
  "SupplierID":"{supplier id}"
 }

Or

{
  "Key":"{api key}",
  "Customer":"{customer name}"
}

Or

{
  "Key":"{api key}",
  "CustomerID":"{customer id}"
 }

Example

http://demo.rpmsoftware.com/rpm/Api.svc/Accounts

{
  "Key":"abc123def456",
  "Supplier":"Qwest"
}
{
  "Key":"abc123def456",
  "SupplierID":"45"
}
{
  "Key":"abc123def456",
  "Customer":"Acme, Inc."
}
{
  "Key":"abc123def456",
  "CustomerID":"10023"
}

Response

If by supplier then we display the customer for each account. If by customer then we display the supplier for each account.

  • Accounts are returned sorted A-Z by account number
{"AccountsResult":
  {
    "Accounts": [
      {
        "Account": "{account number}",
        "AccountID": "{account id}",
        "Customer": "{customer name}",
        "CustomerID": "{customer id}",
        "Supplier": "{supplier name}",
        "SupplierID": "{supplier id}",
        "AccountGroup": "{account group}",
        "AccountGroupID": "{account group id}",
        "Added": "{added date}",
        "Modified": "{modified date}",
        "Fields": [
          {
            "Field": "{field name}",
            "Value": "{field value"
          },
          {repeat as needed}
        ]
      },
      {repeat as needed}
    ]
  }
}   


Example

{"AccountsResult":
  {
    "Accounts": [
      {
        "Account": "000123456",
        "AccountID": "2015",
        "Customer": "Acme, Inc.",
        "CustomerID": "10023"
        "Supplier": "Qwest",
        "SupplierID": "45",
        "AccountGroup": "",
        "AccountGroupID": "",
        "Added": "1/20/2007",
        "Modified": "2/2/2009",
        "Fields": [
          {
            "Field": "My custom list",
            "Value": "First option"
          },
          {
            "Field": "Extra date",
            "Value": "1/22/2008"
           }
        ]
     },
      {
        "Account": "000183400",
        "AccountID": "2021",
        "Customer": "Bravo Hotels",
        "CustomerID": "9985"
        "Supplier": "Qwest",
        "SupplierID": "45",
        "AccountGroup": "",
        "AccountGroupID": "",
        "Added": "1/20/2007",
        "Modified": "2/2/2009",
        "Fields": [
          {
            "Field": "My custom list",
            "Value": ""
          },
          {
            "Field": "Extra date",
            "Value": ""
           }
        ]
     },
      {
        "Account": "000223422",
        "AccountID": "1099",
        "Customer": "Acme, Inc.",
        "CustomerID": "10023"
        "Supplier": "Qwest",
        "SupplierID": "45",
        "AccountGroup": "",
        "AccountGroupID": "",
        "Added": "1/20/2007",
        "Modified": "2/2/2009",
        "Fields": [
          {
            "Field": "My custom list",
            "Value": "Some option"
          },
          {
            "Field": "Extra date",
            "Value": "4/16/2008"
           }
        ]
      }
    ]
  }
}

Errors

  • "Supplier not found"
  • "Customer not found"
  • This page was last modified 20:16, 25 Nov 2009.
  • This page has been accessed 1701 times.