Create Locations

post

/appstore/publisher/v1/services/{listingVersionId}/locations

Creates service location .

Request

Supported Media Types
Path Parameters
Body ()
Root Schema : schema
Type: array
Show Source
Nested Schema : Location
Type: object
Show Source
Nested Schema : Item
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Successful Operation
Body ()
Root Schema : collection
Type: object
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : acknowledgement
Type: object
Show Source

400 Response

Invalid Parameter Value

401 Response

Not Authorized

404 Response

Entity Not Found

500 Response

System Error
Back to Top

Examples

The following example creates geo-graphic locations for the existing service, by submitting a POST request on the REST resource using cURL.

cURL Example

curl -X POST -H "Authorization: Bearer Access-token"  -H "X-Oracle-UserId: partner-email" "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/services/9483951/locations"

Request Header

Authorization: Bearer Access-token 
X-Oracle-UserId: fname.lname@oracle.com 

Request Body

[
  {
    "locationName":"Regional Office",
    
    "city":"Chennai",
    "country":{
      "code":"india"
    },
    "addressLocation":"Tamilnadu",
    "zipCode":"10899",
    "contactPhone":"87654332345",
    "contactEmail":"jenatara@oracle.com",
    "fax":"8762767",
    "websiteUrl":"https://www.oracle.com/index.html",
    "regions":[
        {
        "name":"africa",
        "code":"AFRICA" 
        },
        {
         "name":"japan",
         "code":"JAPAN"
        }
     ]
  },
  {
    "locationName":"Head Office",
    "addressLocation":"Anna st",
    "city":"Banglore",
    "state":"Tamilnadu",
    "country":{
      "code":"india"
    },
    "zipCode":"10899",
    "contactPhone":"87654332345",
    "contactEmail":"headoffice@oracle.com",
    "fax":"8762767",
    "websiteUrl":"https://www.oracle.com/index.html",
    "regions":[
        {
            "code":"EUROPE",
            "name":"Europe"
        }
    ]
    }
]

HTTP Status Code:

200 OK

JSON Response:

{
  "items": [
    {
      "acknowledgement": {
        "message": "Partner location Created Successfully",
        "entityId": "127892090",
        "name": "Regional Office"
      }
    },
    {
      "acknowledgement": {
        "message": "Partner location Created Successfully",
        "entityId": "127892094",
        "name": "Head Office"
      }
    }
  ],
  "hasMore": false,
  "count": 0,
  "totalResults": 0,
  "links": [
    {
      "rel": "CANONICAL",
      "href": "https://slc08zff.us.oracle.com:7101/appstore/publisher/v1/services/109104577/locations"
    },
    {
      "rel": "SELF",
      "href": "https://slc08zff.us.oracle.com:7101/appstore/publisher/v1/services/109104577/locations"
    }
  ]
}
Back to Top