TAG LINE
SMALL TITLE

Country

(API Version v2)


This entity contains a list of country definitions.


What can you do with Country?


Properties

Property Details
identity
READ-ONLY
"identity": 10
Type: Number
This is the unique numeric identifier for the Country
name
"name": "United States of America"
Type: String
User Defined name for the Country
sortOrder
"sortOrder": 16
Type: Number
Unused
ownerId
READ-ONLY
"ownerId": 5
Type: Number
Unique identifier for the associated Owner object.
ownerName
READ-ONLY
"ownerName": "Sample Name"
Type: String
The name of the object associated with the ownerId property.
countryAddressFormatId
"countryAddressFormatId": 19
Type: Number
Unique identifier for the associated CountryAddressFormat object.
countryAddressFormatName
"countryAddressFormatName": "Sample Name"
Type: String
The name of the object associated with the countryAddressFormatId property.
dataTypePostalCodeId
"dataTypePostalCodeId": 27
Type: Number
Unique identifier for the associated DataTypePostalCode object.
dataTypePostalCodeName
"dataTypePostalCodeName": "Sample Name"
Type: String
The name of the object associated with the dataTypePostalCodeId property.
countryCode
"countryCode": "US"
Type: String
The ISO code for the country
isVisible
"isVisible": true
Type: Boolean
Internal flag representing if this country is visible in the user interface.


Update Request Filters

Update Request Filters are no longer required starting with v4 of the LogiSense Billing API.

When updating an object you use the update request header with the list of properties to update. Then you need only supply the new values in the body of your request. Please note, this header can only be used with PUT or PATCH requests.

Field List:

  • name
  • sortOrder
  • countryAddressFormatId
  • dataTypePostalCodeId
  • countryCode
  • isVisible

Patch Types

The PATCH verb allows you to update an object. Just like a put, you only need to supply the fields that will be updated in the payload. However, a patch allows you to update many objects at once.

PATCH operations can be used as a standard API call or nested within the envelope of a DataFlow. Below you will find the child objects that can be updated as part of PATCH operations for the Country object.

Standard PATCH objects:

  • state - create, update, delete

DataFlow PATCH objects:

  • country - create, update, delete
  • state - create, update, delete

End Points

DELETEapi/v2/Country/{id}
Delete an instance of the Country object. Upon successful delete, this API will return a record of all of the reelated objects deleted with this operation. The specifics on which objects have been deleted will depend on which related objects have been populated in the system.
{id}Unique identifier for the Country object.
Delete an instance of the Country object.
DELETE api/v2/Country/{id}
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "type": "delete",
    "results": {
        "totalCount": 4,
        "items": [
            {
                "identity": 1,
                "action": "deleted",
                "dtoTypeKey": "country"
            },
            {
                "lhsId": 2,
                "rhsId": 2,
                "action": "detached",
                "dtoTypeKey": "sampleObjectConnector"
            },
            {
                "foreignKeyIdentity": 2,
                "action": "deleted",
                "dtoTypeKey": "sampleObject"
            }
        ]
    }
}
GETapi/v2/Country/
Retrieve all of the Country objects.
Retrieve all of the Country objects.
GET api/v2/Country/
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "totalCount": 1,
    "items": [
        {
            "identity": 1,
            "name": "United States of America",
            "sortOrder": 13,
            "ownerId": 23,
            "ownerName": "Sample Text Data",
            "countryAddressFormatId": 25,
            "countryAddressFormatName": "Sample Text Data",
            "dataTypePostalCodeId": 0,
            "dataTypePostalCodeName": "Sample Text Data",
            "countryCode": "US",
            "isVisible": true
        }
    ]
}
GETapi/v2/Country/Paged
Retrieve all of the Country objects in a paged fashion. This endpoint implements pagination for its results. Individual pages can be requested to return a particular paged set in the list of results. To learn more, see details on working with paginated endpoints.
Retrieve all of the Country objects in a paged fashion.
GET api/v2/Country/Paged
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "pagination": {
        "pageNumber": 1,
        "pageSize": 20,
        "excludeTotalCount": false
    },
    "pagedResults": {
        "totalCount": 1,
        "items": [
            {
                "identity": 1,
                "name": "United States of America",
                "sortOrder": 26,
                "ownerId": 23,
                "ownerName": "Sample Text Data",
                "countryAddressFormatId": 25,
                "countryAddressFormatName": "Sample Text Data",
                "dataTypePostalCodeId": 11,
                "dataTypePostalCodeName": "Sample Text Data",
                "countryCode": "US",
                "isVisible": true
            }
        ]
    }
}
GETapi/v2/Country/Paged/Detail
Retrieve all of the Country objects in a paged fashion with all object details. This endpoint returns additional detailed data related to this object. The specifics on which data is returned will depend on which related objects have been populated in the system.
Retrieve all of the Country objects in a paged fashion with all object details.
GET api/v2/Country/Paged/Detail
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "pagination": {
        "pageNumber": 1,
        "pageSize": 20,
        "excludeTotalCount": false
    },
    "pagedResults": {
        "totalCount": 1,
        "items": [
            {
                "identity": 1,
                "name": "United States of America",
                "sortOrder": 7,
                "ownerId": 2,
                "ownerName": "Sample Text Data",
                "countryAddressFormatId": 10,
                "countryAddressFormatName": "Sample Text Data",
                "dataTypePostalCodeId": 18,
                "dataTypePostalCodeName": "Sample Text Data",
                "countryCode": "US",
                "isVisible": true,
                "details": {
                    "sampleSingleObject": {
                        "identity": 2,
                        "property1": "Sample Text",
                        "property2": "2021-04-26T15:25:29.117Z",
                        "property3": 2
                    },
                    "sampleMultipleObjects": {
                        "totalCount": 1,
                        "items": [
                            {
                                "identity": 2,
                                "property1": "Sample Text",
                                "property2": "2021-04-26T15:25:29.117Z",
                                "property3": 2
                            }
                        ]
                    }
                }
            }
        ]
    }
}
GETapi/v2/Country/{id}
Retrieve an instance of the Country object by its ID.
{id}Unique identifier for the Country object.
Retrieve an instance of the Country object by its ID.
GET api/v2/Country/{id}
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "instance": {
        "identity": 1,
        "name": "United States of America",
        "sortOrder": 12,
        "ownerId": 6,
        "ownerName": "Sample Text Data",
        "countryAddressFormatId": 11,
        "countryAddressFormatName": "Sample Text Data",
        "dataTypePostalCodeId": 23,
        "dataTypePostalCodeName": "Sample Text Data",
        "countryCode": "US",
        "isVisible": true
    }
}
GETapi/v2/Country/{id}/Detail
Retrieve deep detail of the Country object by its ID. This endpoint returns additional detailed data related to this object. The specifics on which data is returned will depend on which related objects have been populated in the system.
{id}Unique identifier for the Country object.
Retrieve deep detail of the Country object by its ID.
GET api/v2/Country/{id}/Detail
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "instance": {
        "identity": 1,
        "name": "United States of America",
        "sortOrder": 7,
        "ownerId": 14,
        "ownerName": "Sample Text Data",
        "countryAddressFormatId": 7,
        "countryAddressFormatName": "Sample Text Data",
        "dataTypePostalCodeId": 10,
        "dataTypePostalCodeName": "Sample Text Data",
        "countryCode": "US",
        "isVisible": true,
        "details": {
            "sampleSingleObject": {
                "identity": 2,
                "property1": "Sample Text",
                "property2": "2021-04-26T15:25:29.117Z",
                "property3": 2
            },
            "sampleMultipleObjects": {
                "totalCount": 1,
                "items": [
                    {
                        "identity": 2,
                        "property1": "Sample Text",
                        "property2": "2021-04-26T15:25:29.117Z",
                        "property3": 2
                    }
                ]
            }
        }
    }
}
PATCHapi/v2/Country/{id}
Update or Add the Country object and optionally make changes to any child objects. Patch end points allow for adding/updating multiple related entities and the results of those changes will be reported in the response JSON payload in the items array.
{id}Unique identifier for the Country object.
Update or Add the Country object and optionally make changes to any child objects.
PATCH api/v2/Country/{id}

{
    "details": {},
    "countrys": {
        "items": [
            {
                "patchType": "create",
                "patchClientId": 1,
                "name": "United States of America",
                "sortOrder": 8,
                "countryAddressFormatId": 6,
                "dataTypePostalCodeId": 19,
                "countryCode": "US",
                "isVisible": true
            }
        ]
    }
}
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "type": "patch",
    "results": {
        "totalCount": 1,
        "items": [
            {
                "identity": 1,
                "action": "created",
                "dtoTypeKey": "country",
                "instance": {
                    "identity": 1,
                    "name": "United States of America",
                    "sortOrder": 9,
                    "ownerId": 21,
                    "ownerName": "Sample Text Data",
                    "countryAddressFormatId": 25,
                    "countryAddressFormatName": "Sample Text Data",
                    "dataTypePostalCodeId": 22,
                    "dataTypePostalCodeName": "Sample Text Data",
                    "countryCode": "US",
                    "isVisible": true
                }
            }
        ]
    }
}
POSTapi/v2/Country/
Create a new instance of the Country object.
Create a new instance of the Country object.
POST api/v2/Country/

{
    "name": "United States of America",
    "sortOrder": 20,
    "countryAddressFormatId": 26,
    "dataTypePostalCodeId": 19,
    "countryCode": "US",
    "isVisible": true
}
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "type": "create",
    "results": {
        "totalCount": 1,
        "items": [
            {
                "identity": 1,
                "name": "United States of America",
                "sortOrder": 15,
                "ownerId": 1,
                "ownerName": "Sample Text Data",
                "countryAddressFormatId": 21,
                "countryAddressFormatName": "Sample Text Data",
                "dataTypePostalCodeId": 4,
                "dataTypePostalCodeName": "Sample Text Data",
                "countryCode": "US",
                "isVisible": true
            }
        ]
    }
}
PUTapi/v2/Country/{id}
Update an existing instance of the Country object.
Update an existing instance of the Country object.
PUT api/v2/Country/{id}

{
    "identity": 1,
    "name": "United States of America",
    "sortOrder": 15,
    "countryAddressFormatId": 8,
    "dataTypePostalCodeId": 5,
    "countryCode": "US",
    "isVisible": true
}
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "type": "update",
    "results": {
        "totalCount": 1,
        "items": [
            {
                "identity": 1,
                "name": "United States of America",
                "sortOrder": 13,
                "ownerId": 9,
                "ownerName": "Sample Text Data",
                "countryAddressFormatId": 14,
                "countryAddressFormatName": "Sample Text Data",
                "dataTypePostalCodeId": 21,
                "dataTypePostalCodeName": "Sample Text Data",
                "countryCode": "US",
                "isVisible": true
            }
        ]
    }
}