Retrieve PY States By Codes
    • 04 Dec 2024
    • 3 Minutes to read
    • Dark
      Light

    Retrieve PY States By Codes

    • Dark
      Light

    Article summary

    Get
    /hcm-rest-api/rest/1/pystate

    Query Standards

    Finder

    Following row finders are available for data filtering and optimizing request performance.

    • Find By Country
    • Find By Date
    • Primary Key

    Find By Country

    Recommended finder parameters. Refer to Query Parameters for example.

    ParameterDescriptionSample
    countryCodeCountry CodeCA

    Find By Date

    This is an optional finder for querying States by Audit Date.

    ParameterDescriptionSample
    AuditDateCreate or Update Date Time Filter2022-12-20

    Primary Key

    This is an optional finder for querying States by Primary Key (combination of attributes).

    ParameterDescriptionSample
    StaCountryCodeCountry CodeCA
    StaSateCodeState CodeAB
    Security
    HTTP
    Type basic

    Basic authentication

    Query parameters
    finder
    string
    ExamplefindByCountry;countryCode=CA
    limit
    integer
    Example500
    offset
    integer
    Example0
    totalResults
    boolean
    ExampleTrue
    orderBy
    string
    ExampleStaCountryCode
    Responses
    200

    OK

    Headers
    Content-Type
    string
    Exampleapplication/vnd.oracle.adf.resourcecollection+json
    example-0

    Successful Response - Finder - findByDate

    {
      "items": [
        {
          "StaCountryCode": "CA",
          "StaStateCode": "NB",
          "StaStateName": "New Brunswick",
          "StaShortName": "New Brunswick",
          "StaPrtPrevailingWageRate": null,
          "StaUser": "DA",
          "StaLastUpdDate": "1999-12-08T02:39:12Z",
          "StaIuCreateDate": null,
          "StaIuCreateUser": null,
          "StaIuUpdateDate": "2018-09-20T08:06:33Z",
          "StaIuUpdateUser": "DA",
          "links": [
            {
              "rel": "self",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024341000000024E42",
              "name": "pystate",
              "kind": "item"
            },
            {
              "rel": "canonical",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024341000000024E42",
              "name": "pystate",
              "kind": "item"
            }
          ]
        },
        {
          "StaCountryCode": "LB",
          "StaStateCode": "BE",
          "StaStateName": "BEIRUT",
          "StaShortName": "Beirut",
          "StaPrtPrevailingWageRate": "N",
          "StaUser": "IMAD",
          "StaLastUpdDate": "2016-04-29T05:47:58Z",
          "StaIuCreateDate": "2016-04-29T05:47:58Z",
          "StaIuCreateUser": "IMAD",
          "StaIuUpdateDate": null,
          "StaIuUpdateUser": null,
          "links": [
            {
              "rel": "self",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024C42000000024245",
              "name": "pystate",
              "kind": "item"
            },
            {
              "rel": "canonical",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024C42000000024245",
              "name": "pystate",
              "kind": "item"
            }
          ]
        },
        {
          "StaCountryCode": "LB",
          "StaStateCode": "N",
          "StaStateName": "NORTH",
          "StaShortName": "North",
          "StaPrtPrevailingWageRate": "N",
          "StaUser": "IMAD",
          "StaLastUpdDate": "2016-04-29T05:47:58Z",
          "StaIuCreateDate": "2016-04-29T05:47:58Z",
          "StaIuCreateUser": "IMAD",
          "StaIuUpdateDate": null,
          "StaIuUpdateUser": null,
          "links": [
            {
              "rel": "self",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024C42000000014E",
              "name": "pystate",
              "kind": "item"
            },
            {
              "rel": "canonical",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024C42000000014E",
              "name": "pystate",
              "kind": "item"
            }
          ]
        },
        {
          "StaCountryCode": "LB",
          "StaStateCode": "S",
          "StaStateName": "SOUTH",
          "StaShortName": "South",
          "StaPrtPrevailingWageRate": "N",
          "StaUser": "IMAD",
          "StaLastUpdDate": "2016-04-29T05:47:58Z",
          "StaIuCreateDate": "2016-04-29T05:47:58Z",
          "StaIuCreateUser": "IMAD",
          "StaIuUpdateDate": null,
          "StaIuUpdateUser": null,
          "links": [
            {
              "rel": "self",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024C420000000153",
              "name": "pystate",
              "kind": "item"
            },
            {
              "rel": "canonical",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024C420000000153",
              "name": "pystate",
              "kind": "item"
            }
          ]
        },
        {
          "StaCountryCode": "LB",
          "StaStateCode": "B",
          "StaStateName": "BEKAA",
          "StaShortName": "Bekaa",
          "StaPrtPrevailingWageRate": "N",
          "StaUser": "IMAD",
          "StaLastUpdDate": "2016-04-29T05:47:58Z",
          "StaIuCreateDate": "2016-04-29T05:47:58Z",
          "StaIuCreateUser": "IMAD",
          "StaIuUpdateDate": null,
          "StaIuUpdateUser": null,
          "links": [
            {
              "rel": "self",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024C420000000142",
              "name": "pystate",
              "kind": "item"
            },
            {
              "rel": "canonical",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024C420000000142",
              "name": "pystate",
              "kind": "item"
            }
          ]
        }
      ],
      "count": 5,
      "hasMore": true,
      "limit": 5,
      "offset": 0,
      "links": [
        {
          "rel": "self",
          "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate",
          "name": "pystate",
          "kind": "collection"
        }
      ]
    }
    example-1

    Successful Response - Finder - PrimaryKey

    {
      "items": [
        {
          "StaCountryCode": "CA",
          "StaStateCode": "AB",
          "StaStateName": "Alberta",
          "StaShortName": "Alberta",
          "StaPrtPrevailingWageRate": null,
          "StaUser": "DA",
          "StaLastUpdDate": "1999-12-08T02:39:12Z",
          "StaIuCreateDate": null,
          "StaIuCreateUser": null,
          "StaIuUpdateDate": null,
          "StaIuUpdateUser": null,
          "links": [
            {
              "rel": "self",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024341000000024142",
              "name": "pystate",
              "kind": "item"
            },
            {
              "rel": "canonical",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024341000000024142",
              "name": "pystate",
              "kind": "item"
            }
          ]
        }
      ],
      "count": 1,
      "hasMore": false,
      "limit": 25,
      "offset": 0,
      "links": [
        {
          "rel": "self",
          "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate",
          "name": "pystate",
          "kind": "collection"
        }
      ]
    }
    example-2

    Successful Response - Finder - findByCountry

    {
      "items": [
        {
          "StaCountryCode": "CA",
          "StaStateCode": "AB",
          "StaStateName": "Alberta",
          "StaShortName": "Alberta",
          "StaPrtPrevailingWageRate": null,
          "StaUser": "DA",
          "StaLastUpdDate": "1999-12-08T02:39:12Z",
          "StaIuCreateDate": null,
          "StaIuCreateUser": null,
          "StaIuUpdateDate": null,
          "StaIuUpdateUser": null,
          "links": [
            {
              "rel": "self",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024341000000024142",
              "name": "pystate",
              "kind": "item"
            },
            {
              "rel": "canonical",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024341000000024142",
              "name": "pystate",
              "kind": "item"
            }
          ]
        },
        {
          "StaCountryCode": "CA",
          "StaStateCode": "BC",
          "StaStateName": "British Columbia",
          "StaShortName": "Brit. Columbia",
          "StaPrtPrevailingWageRate": null,
          "StaUser": "DA",
          "StaLastUpdDate": "1999-12-08T02:39:12Z",
          "StaIuCreateDate": null,
          "StaIuCreateUser": null,
          "StaIuUpdateDate": null,
          "StaIuUpdateUser": null,
          "links": [
            {
              "rel": "self",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024341000000024243",
              "name": "pystate",
              "kind": "item"
            },
            {
              "rel": "canonical",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024341000000024243",
              "name": "pystate",
              "kind": "item"
            }
          ]
        },
        {
          "StaCountryCode": "CA",
          "StaStateCode": "MB",
          "StaStateName": "Manitoba",
          "StaShortName": "Manitoba",
          "StaPrtPrevailingWageRate": null,
          "StaUser": "DA",
          "StaLastUpdDate": "1999-12-08T02:39:12Z",
          "StaIuCreateDate": null,
          "StaIuCreateUser": null,
          "StaIuUpdateDate": null,
          "StaIuUpdateUser": null,
          "links": [
            {
              "rel": "self",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024341000000024D42",
              "name": "pystate",
              "kind": "item"
            },
            {
              "rel": "canonical",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024341000000024D42",
              "name": "pystate",
              "kind": "item"
            }
          ]
        },
        {
          "StaCountryCode": "CA",
          "StaStateCode": "NB",
          "StaStateName": "New Brunswick",
          "StaShortName": "New Brunswick",
          "StaPrtPrevailingWageRate": null,
          "StaUser": "DA",
          "StaLastUpdDate": "1999-12-08T02:39:12Z",
          "StaIuCreateDate": null,
          "StaIuCreateUser": null,
          "StaIuUpdateDate": "2018-09-20T08:06:33Z",
          "StaIuUpdateUser": "DA",
          "links": [
            {
              "rel": "self",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024341000000024E42",
              "name": "pystate",
              "kind": "item"
            },
            {
              "rel": "canonical",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024341000000024E42",
              "name": "pystate",
              "kind": "item"
            }
          ]
        },
        {
          "StaCountryCode": "CA",
          "StaStateCode": "NL",
          "StaStateName": "Newfoundland and Labrador",
          "StaShortName": "Newfoundland",
          "StaPrtPrevailingWageRate": null,
          "StaUser": "DA",
          "StaLastUpdDate": "2014-07-27T11:59:11Z",
          "StaIuCreateDate": "2014-07-27T11:59:11Z",
          "StaIuCreateUser": "DA",
          "StaIuUpdateDate": null,
          "StaIuUpdateUser": null,
          "links": [
            {
              "rel": "self",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024341000000024E4C",
              "name": "pystate",
              "kind": "item"
            },
            {
              "rel": "canonical",
              "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate/0002000000024341000000024E4C",
              "name": "pystate",
              "kind": "item"
            }
          ]
        }
      ],
      "count": 5,
      "hasMore": true,
      "limit": 5,
      "offset": 0,
      "links": [
        {
          "rel": "self",
          "href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pystate",
          "name": "pystate",
          "kind": "collection"
        }
      ]
    }
    object