ADD - n49/N49-Data-Api-Documentation GitHub Wiki
#ADD
The ADD request is used when you ADD a new Listing to n49.ca.
##Request
Properties
Property | Value |
---|---|
Method | POST |
URL | http://data-api.n49.ca/businesses/add |
Content-Type: application/json
The JSON representation of the Listing being added. Finding a match on the site: When you request that a Listing be added to n49.ca, first check to see if there is already a listing for the specified location. If the body of the request does not contain a bID, it means we will create a new listing the business. If you do provide a bID, you will claim the listing with that bID. In either case, n49.ca will respect the match, or lack thereof, included in the request.
If you send an ADD request for a listing whose status is ACTIVE (i.e., the listing's bID is associated with a business you've already claimed), we will respond as if the ADD was a success.
Response
Status Codes
Status Code | Condition | Example Cause |
---|---|---|
200 | OK | The ADD operation was processed successfully and committed to durable storage, if appropriate. |
400 | BAD REQUEST | You sent a malformed request. |
404 | NOT FOUND | The specified listing does not exist on our site. |
409 | BLOCKED | You cannot create the Listing. The location's listing is already associated with another advertiser. |
5xx | SERVER ERROR | Temporary error -- try again later. Server outage, etc. |
Body
A JSON document containing:
Field | Description |
---|---|
status | The current status of the Listing. One of: LIVE: The Listing is fully activated according to the standards. REJECTED - The Listing did not pass our validation. BLOCKED - We cannot create the Listing. |
id | The bID for the new Listing. If the listing already exists on the site, bID will match that listing's ID in the system. |
url | The URL where the listing can be seen on the site |
issues | List of issues that are causing the status to be BLOCKED or REJECTED |