Index

api/v1/cardfiles

Path: api/v1/cardfiles

This API is JSON:API compliant.

This endpoint supports the following methods:
GET PATCH

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

The CardFile resource type attributes are as follows:

{
"cardNo":integer (read-only)
"cardCode":string (read-only)
"contact":string (read-only)
"name":string
"aBN":string (read-only)
"aCN":string (read-only)
"shipVia":string (read-only)
optional
"shipAmount":number (read-only)
"branchCode":string (read-only)
"subBranchCode":string (read-only)
"gLDeptCode":string (read-only)
"customer":{
"terms":string (read-only)
"priceLevel":string (read-only)
"custPONo":string (read-only)
"currencyCode":string (read-only)
"creditHold":string (read-only)
"creditLimit":number (read-only)
"accFeePerc":number (read-only)
"bPayRefNo":string (read-only)
"backorder":string (read-only)
optional
"requiredDays":integer (read-only)
optional
"requiredHours":integer (read-only)
"taxPaid":boolean (read-only)
"taxExclCode":string (read-only)
"taxInclCode":string (read-only)
"batchInvGroupBy":string (read-only)
"sendStatementVia":string (read-only)
"sendInvVia":string (read-only)
"groups": [{
"type":string
"id":integer
"name":string
}]
}
"address":{
optional
"isAddressResidential":boolean
"streetAddress":string
"suburb":string
"state":string
"postCode":string
"country":string
}
"delAddress":{
optional
"isAddressResidential":boolean
"streetAddress":string
"suburb":string
"state":string
"postCode":string
"country":string
}
}

Example GET (Return all)

Path: api/v1/cardfiles?filter[Customer]=True&filter[CardCode][-like]TH

Supported Filters:

ABNTextAccMngLookupACNTextAddressTextNoInverse
BranchLookupCardCodeTextNoInverseCompanyLookupContactTextNoInverseContactTypeTextNoInverse
CountryTextNoInverseCustActiveBoolCustomerBoolCustPayTermNoLookupCustTypeText
DelAddressTextNoInverseDelCountryTextNoInverseDelPostCodeTextNoInverseDelStateTextNoInverseDelSuburbTextNoInverse
DepartmentTextNoInverseDNameTextNoInverseDOBDateRangeFNameTextNoInverseGLDeptLookup
GroupsGroupHasWebLogonBoolJobTitleTextNoInverseLastModifiedDateRangeLNameTextNoInverse
NameTextNoInverseParentCardTextNoInversePersActiveBoolPersonalBoolPostCodeTextNoInverse
PriceGroupLookupShipAddrBoolShipAddrActiveBoolSourceLookupSourceValueText
StateTextNoInverseSubBranchLookupSuburbTextNoInverseTypeValueTextNoInverseUserBool
UserActiveBoolUserGroupsGroupUserInitialsTextVendActiveBoolVendorBool
VendPayTermNoLookupWebLogonTextNoInverse

Operators:

=Equals
[-gte]GreaterThanOrEqual
[-lte]LessThanOrEqual
[-ne]NotEqual
[-lt]LessThan
[-gt]GreaterThan
[-eq]Equal
[-like]Like

Response:

{
    "data": [{
        "id": "10",
        "type": "CardFile",
        "attributes": {
            "name": "User 1",
            "address": {
                "isAddressResidential": null,
                "streetAddress": "",
                "suburb": "",
                "state": "",
                "postCode": "",
                "country": "Australia"
            },
            "delAddress": {
                "isAddressResidential": null,
                "streetAddress": "",
                "suburb": "",
                "state": "",
                "postCode": "",
                "country": "Australia"
            }
        },
        "links": {
            "self": "/api/v1/cardfiles/10"
        }
    },
	{
        "id": "11",
        "type": "CardFile",
        "attributes": {
            "name": "Card 2",
            "address": {
                "isAddressResidential": null,
                "streetAddress": "",
                "suburb": "",
                "state": "",
                "postCode": "",
                "country": "Australia"
            },
            "delAddress": {
                "isAddressResidential": null,
                "streetAddress": "",
                "suburb": "",
                "state": "",
                "postCode": "",
                "country": "Australia"
            }
        },
        "links": {
            "self": "/api/v1/cardfiles/11"
        }
    }
	]
}

Example GET (Return specific)

Path: api/v1/cardfiles/10

Response:

{
    "data": {
        "id": "10",
        "type": "CardFile",
        "attributes": {
            "name": "User 1",
            "address": {
                "isAddressResidential": null,
                "streetAddress": "",
                "suburb": "",
                "state": "",
                "postCode": "",
                "country": "Australia"
            },
            "delAddress": {
                "isAddressResidential": null,
                "streetAddress": "",
                "suburb": "",
                "state": "",
                "postCode": "",
                "country": "Australia"
            }
        },
        "links": {
            "self": "/api/v1/cardfiles/10"
        }
    }
}

Example PATCH

Path: api/v1/cardfiles/10

Request:

{
  "data": {
    "type": "CardFile",
    "id": "10",
    "attributes": {
      "address": {
        "streetAddress": "street line 1\r\nstreet line 2",
        "postcode": "9876",
        "state": "STA",
        "suburb": "the burbs",
        "country": "Australia"
      },
      "delAddress": {
        "streetAddress": "del street line 1\r\nstreet line 2",
        "postcode": "8765",
        "state": "DEL",
        "suburb": "del the burbs",
        "country": "Australia"
      }
    }
  }
}

Response:

{
    "data": {
        "id": "10",
        "type": "CardFile",
        "attributes": {
            "name": "User 1",
            "address": {
                "isAddressResidential": null,
                "streetAddress": "street line 1\r\nstreet line 2",
                "suburb": "the burbs",
                "state": "STA",
                "postCode": "9876",
                "country": "Australia"
            },
            "delAddress": {
                "isAddressResidential": null,
                "streetAddress": "del street line 1\r\nstreet line 2",
                "suburb": "del the burbs",
                "state": "DEL",
                "postCode": "8765",
                "country": "Australia"
            }
        },
        "links": {
            "self": "/api/v1/cardfiles/10"
        }
    }
}