Index | Conventions

api/v1/cardfiles

Path: api/v1/cardfiles

Read and update card files - customers, vendors, prospects and any other card.

The groups attribute has a new home: attributes.groups. Group membership belongs to the card rather than to its customer account, so it is now returned at the card's attribute root - for the card being requested and for every card returned in included - and that is where an update must supply it. Nothing has been taken away: attributes.customer.groups is still returned as well, so a consumer written against the original placement keeps working, but it is read only and no longer the documented home. Groups can now also be updated on a card that is not a customer, which previously failed.

Card hierarchy: a ship card's parent is the account it sits under, and the matching children relationship lists a card's immediate children - its sites - so the hierarchy does not have to be rebuilt from a full card list. children is read only; children are moved by patching each child's parent. Only a ship card can have a parent, mirroring Jim2 itself, and a parent that does not exist, that is the card itself, or that would close a loop in the hierarchy is rejected with 400. A "data": null on the parent relationship removes it, returning the card to the top of the hierarchy - how a site is retired from an account. ?include=children returns each child in full, which is not paged, so prefer the linkage references alone where only the card numbers are needed.

Primary contact: the primaryContact relationship reports which of the card's contacts is the primary one, and moving it is a PATCH of that relationship - the contact that held the designation is demoted, so exactly one contact keeps it. A card always has a primary contact: nominating a contact that belongs to a different card, nominating a contact number the card does not have, or asking for the designation to be removed without nominating another contact, is rejected with 400, and so is deleting the contact that holds it (hand the designation to another contact first).

This API is JSON:API compliant.

This endpoint supports the following methods:
GET PATCH

This endpoint requires an OAuth bearer token, and returns errors in a standard shape. See API Conventions for authentication, error responses and paging, which apply to every endpoint.

The resource type for this endpoint is CardFile
The identifier is cardno

Relationships

A relationship links this CardFile to another resource. Includable relationships can be embedded via the include query parameter (see Includes below). Patchable relationships can be changed via PATCH.

NoteAPI Logged on User permissions are adhered to like any other Jim User.
RelationshipTypeReturnsIncludablePatchable
accountManagerCardFileobject✓✓
childrenCardFilearray✓✗
contactsCardFileContactobject✗✗
parentCardFileobject✓✓
primaryContactCardFileContactobject✗✓

Includes

Use the include query parameter to embed Includable relationships in a single response, for example:
GET /api/v1/cardfiles/{cardno}?include=accountManager,parent,children

Embedded resources are returned in a top-level included array, not nested inside the relationship. Match each one back to its relationship by type and id.

NoteEach relationship you include embeds its full related resources in the response, so requesting includes — especially several at once, or to-many relationships that return every related row with no paging — can greatly increase the size of the payload. Only request the includes you actually need.

For example, requesting include=accountManager returns the accountManager reference under relationships and the full resource in the included array. The reference and the included entry share the same type and id:

		
GET /api/v1/cardfiles/{cardno}?include=accountManager

{
  "data": {
    "type": "CardFile",
    "id": "1001",
    "relationships": {
      "accountManager": {
        "data": { "type": "CardFile", "id": "2002" }
      }
    }
  },
  "included": [
    {
      "type": "CardFile",
      "id": "2002",
      "attributes": { ... }
    }
  ]
}
	

Attributes

The CardFile resource type attributes are as follows:

AttributeTypeRead-onlyDescription
aBNstringThe Australian Business Number (ABN).
aCNstringThe Australian Company Number (ACN).
addressobjectThe card's main (billing) address.
See the address section below.
branchCodestringThe branch code. On update, must match a configured branch, or be empty to clear it. Changing it is only guarded on a card that is a Jim2 user. A request that changes it on a site not configured to use branches is rejected with 400.
Branches are optional in Jim2 - this is only set when your site is configured to use branches.
Changing this requires the Jim2 'CardFile_EditUser' security right - a request that changes it without that right is rejected with 403 Forbidden.
cardCodestring✓The card code.
cardNointeger✓The card file number (unique identifier for the card).
contactstringThe primary contact name on the card.
customerobjectCustomer (debtor) account settings held against the card.
See the customer section below.
delAddressobjectThe card's delivery address.
See the delAddress section below.
gLDeptCodestringThe GL department code. On update, must match a configured GL department, or be empty to clear it. Changing it is only guarded on a card that is a Jim2 user. A request that changes it on a site not configured to use GL departments is rejected with 400.
GL departments are optional in Jim2 - this is only set when your site is configured to use GL departments.
Changing this requires the Jim2 'CardFile_EditUser' security right - a request that changes it without that right is rejected with 403 Forbidden.
groupsarray of objectThe groups the card belongs to. A group's type is Report, Non Report or Region. A Report group also has a level from 1 to 5; level is null for the other two types. On update, the supplied set replaces the card's groups entirely. Identify each group by its id, or by its name - where the name is not unique, add its type to narrow it, and for a Report group whose name is used at more than one level add the level as well, because the type alone cannot separate one level from another. An id identifies the group outright, so any type, name or level sent alongside one must describe that same group or the request is rejected. Send an empty array to remove every group from the card, and omit the field to leave the card's groups unchanged; null is rejected - send an empty array instead.
Changing this requires the Jim2 'ToolsGroupsCardFile_Manage' security right - a request that changes it without that right is rejected with 403 Forbidden.
See the groups section below.
namestringThe card file name.
shipAmountnumberThe customer's default freight amount.
shipViastringThe customer's default ship-via (carrier/method). On update, must match a configured ship-via, or be empty to clear it.
subBranchCodestringThe sub-branch code. On update, must match a configured sub-branch, or be empty to clear it. Changing it is only guarded on a card that is a Jim2 user. A request that changes it on a site not configured to use sub-branches is rejected with 400.
Sub-branches are optional in Jim2 - this is only set when your site is configured to use sub-branches.
Changing this requires the Jim2 'CardFile_EditUser' security right - a request that changes it without that right is rejected with 403 Forbidden.

address

Attributes of the address object.

AttributeTypeRead-onlyDescription
countrystringThe country.
isAddressResidentialbooleanWhether the address is residential.
postCodestringThe post code.
statestringThe state.
streetAddressstringThe street address.
suburbstringThe suburb.

customer

Attributes of the customer object.

AttributeTypeRead-onlyDescription
accFeePercnumberThe customer's account fee percentage.
availableCreditnumber✓The customer's remaining credit: the credit limit less what the customer currently owes, in the customer's own currency. null where the customer has no credit limit set - a credit limit of 0 means no limit, so a customer capped at exactly $0 cannot be told apart from one with no limit at all. The balance deducted is the same one api/v1/accounts/debtors/balance/{cardno} reports with exclPrep=false: job prepayments are included, and a customer in credit is treated as owing nothing, so their whole limit is available. Read only - a request that sets it is rejected with 400.
backorderstringThe customer's backorder preference: Allow Backorders / No Backorders (Supply Available) / No Part Ship (Supply requested Quantity).
batchInvGroupBystringHow batch invoices are grouped for the customer: Customer / Ship / Project / Master Project / Don't Group / Customer Ref.
bPayRefNostringThe customer's BPay reference number. A request that changes it on a site that does not use BPay is rejected with 400.
creditHoldstringThe customer's credit-hold state: OFF( Auto ) / ON( Auto ) / OFF( Manual ) / ON( Manual ). On update, ON( Auto ) cannot be set - it is the result of the automatic credit-hold check. Set OFF( Auto ) to hand the card back to that check.
creditLimitnumberThe customer's credit limit.
Changing this requires the Jim2 'CardFile_EditCustCreditLimit' security right - a request that changes it without that right is rejected with 403 Forbidden.
currencyCodestringThe customer's currency code. On update, must match a configured currency. A request that changes it on a site without multi-currency (the Foreign Currency option and its licence) is rejected with 400.
custPONostringThe customer's standing purchase-order number.
groupsarray of object✓Deprecated. Still returned, but it will be removed in a future release.
The groups the card belongs to, in the same shape as the card's own groups attribute. Read them at the card's attribute root instead - attributes.groups - which carries the identical set. This copy is read only; an update must supply groups at the root.
See the customer.groups section below.
priceLevelstringThe customer's price level description. On update, must match a configured price level. Changing it requires a Jim2 security group that permits a price level move; a caller whose groups set the price level security to 0 is rejected with 403 Forbidden.
requiredDaysintegerThe default number of days until due for the customer.
requiredHoursintegerThe default number of hours until due for the customer.
sendInvViastringHow invoices are sent to the customer: Print / Fax / Email / Email & Print / Don't send.
sendStatementViastringHow statements are sent to the customer: Print / Fax / Email / Email & Print / Don't send.
taxExclCodestringThe tax code for tax-exclusive (wholesale) sales. On update, must match a configured tax code, or be empty to clear it. Tax free / tax paid codes are a Canadian setting: a request that changes it on a site with any other GST country is rejected with 400.
taxInclCodestringThe tax code for tax-inclusive (retail) sales. On update, must match a configured tax code, or be empty to clear it. Tax free / tax paid codes are a Canadian setting: a request that changes it on a site with any other GST country is rejected with 400.
taxPaidbooleanWhether the customer pays tax.
termsstringThe customer's payment terms code. On update, must match a configured payment terms code.
Changing this requires the Jim2 'CardFile_EditCustTerms' security right - a request that changes it without that right is rejected with 403 Forbidden.

delAddress

Attributes of the delAddress object.

AttributeTypeRead-onlyDescription
countrystringThe country.
isAddressResidentialbooleanWhether the address is residential.
postCodestringThe post code.
statestringThe state.
streetAddressstringThe street address.
suburbstringThe suburb.

groups

Attributes of each element in the groups array.

AttributeTypeRead-onlyDescription
idintegerThe group's unique identifier.
levelintegerThe group's reporting level, 1 to 5. Only a Report group has a level - it is null for every other type.
namestringThe group's name.
typestringThe group's type.

customer.groups

Attributes of each element in the customer.groups array.

AttributeTypeRead-onlyDescription
idintegerThe group's unique identifier.
levelintegerThe group's reporting level, 1 to 5. Only a Report group has a level - it is null for every other type.
namestringThe group's name.
typestringThe group's type.

Example GET (Return using filter)

Path: api/v1/cardfiles?filter[isCustActive]=True&filter[cardCode][-like]AC

Filtering

For more information see Resource Filtering.

CardFile Filter uses list technology to retreive data. Names should match those on the list screen in Jim List Help.

The following fields can be used to filter by.
FieldTypeComment
aBNText
accountManager.idInt
aCNText
addressCountryText
addressPostCodeText
addressStateText
addressStreetAddressText
addressSuburbText
branchCodeTextBranch code
cardCodeText
companyCodeTextCompany code
contactText
contactTypeText
custTypeTextCustType code
delAddressCountryText
delAddressPostCodeText
delAddressStateText
delAddressStreetAddressText
delAddressSuburbText
departmentText
displayNameText
firstNameText
gLDeptCodeTextGLDept code
groupsText
hasWebLogonBool
isCustActiveBool
isCustomerBool
isPersonalBool
isShipBool
isShipActiveBool
isUserBool
isUserActiveBool
isVendorBool
isVendorActiveBool
jobTitleText
lastModifiedDateTime
lastNameText
nameText
parent.idInt
sourceNameTextObjectSource code
sourceValueText
subBranchCodeTextSubBranch code
typeValueText
userGroupsText
userInitialsText
webLogonText

Response:

This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response.

This is a list. To keep the example readable, only the first item below is written out; the later items have been trimmed down in this documentation. In a real response each item comes back with the data applicable to that record (as described above).

Side-loading related resources with the include query parameter is not supported on list endpoints: an include parameter is ignored here and no included section is returned. To retrieve a related resource, request it directly using the id shown in each item's relationships, or use the single-resource (get by id) endpoint, which does support include.

{
  "data": [
    {
      "id": "10",
      "type": "CardFile",
      "attributes": {
        "cardNo": 10,
        "cardCode": "ACME",
        "contact": "Jane Smith",
        "name": "Acme Corporation Pty Ltd",
        "aBN": "53 004 085 616",
        "aCN": "004 085 616",
        "shipVia": "Courier Express",
        "shipAmount": 25.00,
        "branchCode": "SYD",
        "subBranchCode": "SYD-NORTH",
        "gLDeptCode": "SALES",
        "customer": {
          "terms": "30 Days",
          "priceLevel": "Retail",
          "custPONo": "PO-44821",
          "currencyCode": "AUD",
          "creditHold": "OFF( Auto )",
          "creditLimit": 50000.00,
          "availableCredit": 32150.00,
          "accFeePerc": 2.50,
          "bPayRefNo": "1234567890",
          "backorder": "Allow Backorders",
          "requiredDays": 7,
          "requiredHours": 0,
          "taxPaid": false,
          "taxExclCode": "GST",
          "taxInclCode": "GSTINC",
          "batchInvGroupBy": "Customer",
          "sendStatementVia": "Email",
          "sendInvVia": "Email",
          "groups": [
            { "type": "Region", "id": 1, "name": "East Coast", "level": null },
            { "type": "Report", "id": 7, "name": "National", "level": 1 }
          ]
        },
        "groups": [
          { "type": "Region", "id": 1, "name": "East Coast", "level": null },
          { "type": "Report", "id": 7, "name": "National", "level": 1 }
        ],
        "address": {
          "isAddressResidential": false,
          "streetAddress": "12 Industrial Ave",
          "suburb": "Chatswood",
          "state": "NSW",
          "postCode": "2067",
          "country": "Australia"
        },
        "delAddress": {
          "isAddressResidential": false,
          "streetAddress": "14 Industrial Ave",
          "suburb": "Chatswood",
          "state": "NSW",
          "postCode": "2067",
          "country": "Australia"
        }
      },
      "relationships": {
        "contacts": {
          "data": [
            { "type": "CardFileContact", "id": "10-1" },
            { "type": "CardFileContact", "id": "10-2" }
          ]
        },
        "accountManager": {
          "data": { "type": "CardFile", "id": "16" }
        },
        "parent": {
          "data": { "type": "CardFile", "id": "2" }
        },
        "children": {
          "data": [
            { "type": "CardFile", "id": "11" },
            { "type": "CardFile", "id": "12" }
          ]
        },
        "primaryContact": {
          "data": { "type": "CardFileContact", "id": "10-1" }
        }
      },
      "links": {
        "self": "/api/v1/cardfiles/10"
      }
    },
    {
      "id": "11",
      "type": "CardFile",
      "attributes": {
        "cardCode": "ACME.CHAT",
        "name": "Acme Corporation - Chatswood Site"
      }
    }
  ]
}

Example GET (Return specific)

Path: api/v1/cardfiles/10?include=accountManager,parent,children

Response:

This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response.

{
  "data": {
    "id": "10",
    "type": "CardFile",
    "attributes": {
      "cardNo": 10,
      "cardCode": "ACME",
      "contact": "Jane Smith",
      "name": "Acme Corporation Pty Ltd",
      "aBN": "53 004 085 616",
      "aCN": "004 085 616",
      "shipVia": "Courier Express",
      "shipAmount": 25.00,
      "branchCode": "SYD",
      "subBranchCode": "SYD-NORTH",
      "gLDeptCode": "SALES",
      "customer": {
        "terms": "30 Days",
        "priceLevel": "Retail",
        "custPONo": "PO-44821",
        "currencyCode": "AUD",
        "creditHold": "OFF( Auto )",
        "creditLimit": 50000.00,
        "availableCredit": 32150.00,
        "accFeePerc": 2.50,
        "bPayRefNo": "1234567890",
        "backorder": "Allow Backorders",
        "requiredDays": 7,
        "requiredHours": 0,
        "taxPaid": false,
        "taxExclCode": "GST",
        "taxInclCode": "GSTINC",
        "batchInvGroupBy": "Customer",
        "sendStatementVia": "Email",
        "sendInvVia": "Email",
        "groups": [
          { "type": "Region", "id": 1, "name": "East Coast", "level": null },
          { "type": "Non Report", "id": 4, "name": "Manufacturing", "level": null },
          { "type": "Report", "id": 7, "name": "National", "level": 1 }
        ]
      },
      "groups": [
        { "type": "Region", "id": 1, "name": "East Coast", "level": null },
        { "type": "Non Report", "id": 4, "name": "Manufacturing", "level": null },
        { "type": "Report", "id": 7, "name": "National", "level": 1 }
      ],
      "address": {
        "isAddressResidential": false,
        "streetAddress": "12 Industrial Ave",
        "suburb": "Chatswood",
        "state": "NSW",
        "postCode": "2067",
        "country": "Australia"
      },
      "delAddress": {
        "isAddressResidential": false,
        "streetAddress": "14 Industrial Ave",
        "suburb": "Chatswood",
        "state": "NSW",
        "postCode": "2067",
        "country": "Australia"
      }
    },
    "relationships": {
      "contacts": {
        "data": [
          { "type": "CardFileContact", "id": "10-1" },
          { "type": "CardFileContact", "id": "10-2" }
        ]
      },
      "accountManager": { "data": { "type": "CardFile", "id": "16" } },
      "parent": { "data": { "type": "CardFile", "id": "2" } },
      "children": {
        "data": [
          { "type": "CardFile", "id": "11" },
          { "type": "CardFile", "id": "12" }
        ]
      },
      "primaryContact": { "data": { "type": "CardFileContact", "id": "10-1" } }
    },
    "links": {
      "self": "/api/v1/cardfiles/10"
    }
  },
  "included": [
    {
      "type": "CardFile",
      "id": "16",
      "attributes": {
        "cardNo": 16,
        "cardCode": "STAFF.AM",
        "contact": "Alex Manager",
        "name": "Alex Manager",
        "aBN": "68 987 654 321",
        "aCN": "987 654 321",
        "shipVia": "Courier Express",
        "shipAmount": 15.00,
        "branchCode": "SYD",
        "subBranchCode": "SYD-NORTH",
        "gLDeptCode": "SALES",
        "customer": {
          "terms": "30 Days",
          "priceLevel": "Staff",
          "custPONo": "PO-STAFF-01",
          "currencyCode": "AUD",
          "creditHold": "OFF( Auto )",
          "creditLimit": 10000.00,
          "availableCredit": 10000.00,
          "accFeePerc": 1.50,
          "bPayRefNo": "9988776655",
          "backorder": "Allow Backorders",
          "requiredDays": 14,
          "requiredHours": 0,
          "taxPaid": true,
          "taxExclCode": "GST",
          "taxInclCode": "GSTINC",
          "batchInvGroupBy": "Customer",
          "sendStatementVia": "Email",
          "sendInvVia": "Email",
          "groups": [
            { "type": "Region", "id": 1, "name": "East Coast", "level": null }
          ]
        },
        "groups": [
          { "type": "Region", "id": 1, "name": "East Coast", "level": null }
        ],
        "address": {
          "isAddressResidential": false,
          "streetAddress": "12 Industrial Ave",
          "suburb": "Chatswood",
          "state": "NSW",
          "postCode": "2067",
          "country": "Australia"
        },
        "delAddress": {
          "isAddressResidential": false,
          "streetAddress": "12 Industrial Ave",
          "suburb": "Chatswood",
          "state": "NSW",
          "postCode": "2067",
          "country": "Australia"
        }
      },
      "relationships": {
        "contacts": {
          "data": [
            { "type": "CardFileContact", "id": "16-1" }
          ]
        },
        "accountManager": { "data": { "type": "CardFile", "id": "16" } },
        "primaryContact": { "data": { "type": "CardFileContact", "id": "16-1" } }
      }
    },
    {
      "type": "CardFile",
      "id": "2",
      "attributes": {
        "cardNo": 2,
        "cardCode": "ACME.GROUP",
        "contact": "Head Office",
        "name": "Acme Group Holdings Pty Ltd",
        "aBN": "11 222 333 444",
        "aCN": "222 333 444",
        "shipVia": "Own Truck",
        "shipAmount": 40.00,
        "branchCode": "SYD",
        "subBranchCode": "SYD-NORTH",
        "gLDeptCode": "SALES",
        "customer": {
          "terms": "30 Days",
          "priceLevel": "Retail",
          "custPONo": "PO-GROUP-2024",
          "currencyCode": "AUD",
          "creditHold": "OFF( Auto )",
          "creditLimit": 100000.00,
          "availableCredit": 87500.00,
          "accFeePerc": 2.00,
          "bPayRefNo": "1122334455",
          "backorder": "Allow Backorders",
          "requiredDays": 30,
          "requiredHours": 0,
          "taxPaid": true,
          "taxExclCode": "GST",
          "taxInclCode": "GSTINC",
          "batchInvGroupBy": "Master Project",
          "sendStatementVia": "Email & Print",
          "sendInvVia": "Email & Print",
          "groups": [
            { "type": "Region", "id": 1, "name": "East Coast", "level": null },
            { "type": "Non Report", "id": 4, "name": "Manufacturing", "level": null }
          ]
        },
        "groups": [
          { "type": "Region", "id": 1, "name": "East Coast", "level": null },
          { "type": "Non Report", "id": 4, "name": "Manufacturing", "level": null }
        ],
        "address": {
          "isAddressResidential": false,
          "streetAddress": "1 Corporate Drive",
          "suburb": "North Sydney",
          "state": "NSW",
          "postCode": "2060",
          "country": "Australia"
        },
        "delAddress": {
          "isAddressResidential": false,
          "streetAddress": "1 Corporate Drive",
          "suburb": "North Sydney",
          "state": "NSW",
          "postCode": "2060",
          "country": "Australia"
        }
      },
      "relationships": {
        "contacts": {
          "data": [
            { "type": "CardFileContact", "id": "2-1" }
          ]
        },
        "accountManager": { "data": { "type": "CardFile", "id": "16" } },
        "children": {
          "data": [
            { "type": "CardFile", "id": "10" }
          ]
        },
        "primaryContact": { "data": { "type": "CardFileContact", "id": "2-1" } }
      }
    },
    {
      "type": "CardFile",
      "id": "11",
      "attributes": {
        "cardNo": 11,
        "cardCode": "ACME.CHAT",
        "contact": "Site Supervisor",
        "name": "Acme Corporation - Chatswood Site",
        "aBN": "53 004 085 616",
        "aCN": "004 085 616",
        "shipVia": "Courier Express",
        "shipAmount": 25.00,
        "branchCode": "SYD",
        "subBranchCode": "SYD-NORTH",
        "gLDeptCode": "SALES",
        "customer": {
          "terms": "30 Days",
          "priceLevel": "Retail",
          "custPONo": "PO-CHAT-2024",
          "currencyCode": "AUD",
          "creditHold": "OFF( Auto )",
          "creditLimit": 15000.00,
          "availableCredit": 12750.00,
          "accFeePerc": 2.50,
          "bPayRefNo": "2233445566",
          "backorder": "Allow Backorders",
          "requiredDays": 7,
          "requiredHours": 0,
          "taxPaid": false,
          "taxExclCode": "GST",
          "taxInclCode": "GSTINC",
          "batchInvGroupBy": "Ship",
          "sendStatementVia": "Email",
          "sendInvVia": "Email",
          "groups": [
            { "type": "Region", "id": 1, "name": "East Coast", "level": null }
          ]
        },
        "groups": [
          { "type": "Region", "id": 1, "name": "East Coast", "level": null }
        ],
        "address": {
          "isAddressResidential": false,
          "streetAddress": "12 Industrial Ave",
          "suburb": "Chatswood",
          "state": "NSW",
          "postCode": "2067",
          "country": "Australia"
        },
        "delAddress": {
          "isAddressResidential": false,
          "streetAddress": "12 Industrial Ave",
          "suburb": "Chatswood",
          "state": "NSW",
          "postCode": "2067",
          "country": "Australia"
        }
      },
      "relationships": {
        "contacts": {
          "data": [
            { "type": "CardFileContact", "id": "11-1" }
          ]
        },
        "accountManager": { "data": { "type": "CardFile", "id": "16" } },
        "parent": { "data": { "type": "CardFile", "id": "10" } },
        "primaryContact": { "data": { "type": "CardFileContact", "id": "11-1" } }
      }
    },
    {
      "type": "CardFile",
      "id": "12",
      "attributes": {
        "cardNo": 12,
        "cardCode": "ACME.PARR",
        "contact": "Site Supervisor",
        "name": "Acme Corporation - Parramatta Site",
        "aBN": "53 004 085 616",
        "aCN": "004 085 616",
        "shipVia": "Own Truck",
        "shipAmount": 30.00,
        "branchCode": "SYD",
        "subBranchCode": "SYD-WEST",
        "gLDeptCode": "SALES",
        "customer": {
          "terms": "30 Days",
          "priceLevel": "Retail",
          "custPONo": "PO-PARR-2024",
          "currencyCode": "AUD",
          "creditHold": "OFF( Auto )",
          "creditLimit": 15000.00,
          "availableCredit": 9800.00,
          "accFeePerc": 2.50,
          "bPayRefNo": "3344556677",
          "backorder": "Allow Backorders",
          "requiredDays": 7,
          "requiredHours": 0,
          "taxPaid": false,
          "taxExclCode": "GST",
          "taxInclCode": "GSTINC",
          "batchInvGroupBy": "Ship",
          "sendStatementVia": "Email",
          "sendInvVia": "Email",
          "groups": [
            { "type": "Region", "id": 1, "name": "East Coast", "level": null }
          ]
        },
        "groups": [
          { "type": "Region", "id": 1, "name": "East Coast", "level": null }
        ],
        "address": {
          "isAddressResidential": false,
          "streetAddress": "8 Macquarie Street",
          "suburb": "Parramatta",
          "state": "NSW",
          "postCode": "2150",
          "country": "Australia"
        },
        "delAddress": {
          "isAddressResidential": false,
          "streetAddress": "8 Macquarie Street",
          "suburb": "Parramatta",
          "state": "NSW",
          "postCode": "2150",
          "country": "Australia"
        }
      },
      "relationships": {
        "contacts": {
          "data": [
            { "type": "CardFileContact", "id": "12-1" }
          ]
        },
        "accountManager": { "data": { "type": "CardFile", "id": "16" } },
        "parent": { "data": { "type": "CardFile", "id": "10" } },
        "primaryContact": { "data": { "type": "CardFileContact", "id": "12-1" } }
      }
    }
  ]
}

Example PATCH

Path: api/v1/cardfiles/10

Request:

{
  "data": {
    "type": "CardFile",
    "id": "10",
    "attributes": {
      "name": "Acme Corporation Pty Ltd",
      "contact": "Jane Smith",
      "aBN": "53 004 085 616",
      "aCN": "004 085 616",
      "shipVia": "Courier Express",
      "shipAmount": 25.00,
      "branchCode": "SYD",
      "subBranchCode": "SYD-NORTH",
      "gLDeptCode": "SALES",
      "customer": {
        "terms": "30 Days",
        "priceLevel": "Retail",
        "custPONo": "PO-44821",
        "currencyCode": "AUD",
        "creditHold": "ON( Manual )",
        "creditLimit": 50000.00,
        "accFeePerc": 2.50,
        "bPayRefNo": "1234567890",
        "backorder": "Allow Backorders",
        "requiredDays": 7,
        "requiredHours": 0,
        "taxPaid": false,
        "taxExclCode": "GST",
        "taxInclCode": "GSTINC",
        "batchInvGroupBy": "Customer",
        "sendStatementVia": "Email",
        "sendInvVia": "Email"
      },
      "groups": [
        { "type": "Region", "id": 1, "name": "East Coast", "level": null },
        { "type": "Non Report", "id": 4, "name": "Manufacturing", "level": null },
        { "type": "Report", "id": 7, "name": "National", "level": 1 }
      ],
      "address": {
        "isAddressResidential": false,
        "streetAddress": "12 Industrial Ave",
        "suburb": "Chatswood",
        "state": "NSW",
        "postCode": "2067",
        "country": "Australia"
      },
      "delAddress": {
        "isAddressResidential": false,
        "streetAddress": "14 Industrial Ave",
        "suburb": "Chatswood",
        "state": "NSW",
        "postCode": "2067",
        "country": "Australia"
      }
    },
    "relationships": {
      "accountManager": {
        "data": { "type": "CardFile", "id": "16" }
      },
      "parent": {
        "data": { "type": "CardFile", "id": "2" }
      },
      "primaryContact": {
        "data": { "type": "CardFileContact", "id": "10-1" }
      }
    }
  }
}

Response:

This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response.

{
  "data": {
    "id": "10",
    "type": "CardFile",
    "attributes": {
      "cardNo": 10,
      "cardCode": "ACME",
      "contact": "Jane Smith",
      "name": "Acme Corporation Pty Ltd",
      "aBN": "53 004 085 616",
      "aCN": "004 085 616",
      "shipVia": "Courier Express",
      "shipAmount": 25.00,
      "branchCode": "SYD",
      "subBranchCode": "SYD-NORTH",
      "gLDeptCode": "SALES",
      "customer": {
        "terms": "30 Days",
        "priceLevel": "Retail",
        "custPONo": "PO-44821",
        "currencyCode": "AUD",
        "creditHold": "ON( Manual )",
        "creditLimit": 50000.00,
        "availableCredit": 32150.00,
        "accFeePerc": 2.50,
        "bPayRefNo": "1234567890",
        "backorder": "Allow Backorders",
        "requiredDays": 7,
        "requiredHours": 0,
        "taxPaid": false,
        "taxExclCode": "GST",
        "taxInclCode": "GSTINC",
        "batchInvGroupBy": "Customer",
        "sendStatementVia": "Email",
        "sendInvVia": "Email",
        "groups": [
          { "type": "Region", "id": 1, "name": "East Coast", "level": null },
          { "type": "Non Report", "id": 4, "name": "Manufacturing", "level": null },
          { "type": "Report", "id": 7, "name": "National", "level": 1 }
        ]
      },
      "groups": [
        { "type": "Region", "id": 1, "name": "East Coast", "level": null },
        { "type": "Non Report", "id": 4, "name": "Manufacturing", "level": null },
        { "type": "Report", "id": 7, "name": "National", "level": 1 }
      ],
      "address": {
        "isAddressResidential": false,
        "streetAddress": "12 Industrial Ave",
        "suburb": "Chatswood",
        "state": "NSW",
        "postCode": "2067",
        "country": "Australia"
      },
      "delAddress": {
        "isAddressResidential": false,
        "streetAddress": "14 Industrial Ave",
        "suburb": "Chatswood",
        "state": "NSW",
        "postCode": "2067",
        "country": "Australia"
      }
    },
    "relationships": {
      "contacts": {
        "data": [
          { "type": "CardFileContact", "id": "10-1" },
          { "type": "CardFileContact", "id": "10-2" }
        ]
      },
      "accountManager": {
        "data": { "type": "CardFile", "id": "16" }
      },
      "parent": {
        "data": { "type": "CardFile", "id": "2" }
      },
      "children": {
        "data": [
          { "type": "CardFile", "id": "11" },
          { "type": "CardFile", "id": "12" }
        ]
      },
      "primaryContact": {
        "data": { "type": "CardFileContact", "id": "10-1" }
      }
    },
    "links": {
      "self": "/api/v1/cardfiles/10"
    }
  }
}