POST api/v{version}/Providers/me/businesses

Request Information

URI Parameters

NameDescriptionTypeAdditional information
version

string

None.

Body Parameters

AddBusinessModelOld
NameDescriptionTypeAdditional information
Title

string

Required

String length: inclusive between 2 and 128

Description

string

None.

PhoneNo

string

None.

Address

string

Required

GeoId

integer

Required

Location

GeoLocation

Required

CategoryId

Collection of integer

Required

Services

Collection of integer

Required

WorkingHours

Collection of WorkingHour

None.

Request Formats

application/json, text/json

Sample:
{
  "Title": "sample string 1",
  "Description": "sample string 2",
  "PhoneNo": "sample string 3",
  "Address": "sample string 4",
  "GeoId": 1,
  "Location": {
    "Lat": 1.1,
    "Lng": 1.1
  },
  "CategoryId": [
    1,
    2
  ],
  "Services": [
    1,
    2
  ],
  "WorkingHours": [
    {
      "DayOfWeek": 0,
      "StartAt": 1,
      "EndAt": 1,
      "Is24HourOpen": true
    },
    {
      "DayOfWeek": 0,
      "StartAt": 1,
      "EndAt": 1,
      "Is24HourOpen": true
    }
  ]
}

application/xml, text/xml

Sample:
<AddBusinessModelOld xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FastFixCore.BindingModels">
  <Address>sample string 4</Address>
  <CategoryId xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </CategoryId>
  <Description>sample string 2</Description>
  <GeoId>1</GeoId>
  <Location xmlns:d2p1="http://schemas.datacontract.org/2004/07/FastFixCore.Common">
    <d2p1:Lat>1.1</d2p1:Lat>
    <d2p1:Lng>1.1</d2p1:Lng>
  </Location>
  <PhoneNo>sample string 3</PhoneNo>
  <Services xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </Services>
  <Title>sample string 1</Title>
  <WorkingHours>
    <WorkingHour>
      <DayOfWeek>Sunday</DayOfWeek>
      <EndAt>1</EndAt>
      <Is24HourOpen>true</Is24HourOpen>
      <StartAt>1</StartAt>
    </WorkingHour>
    <WorkingHour>
      <DayOfWeek>Sunday</DayOfWeek>
      <EndAt>1</EndAt>
      <Is24HourOpen>true</Is24HourOpen>
      <StartAt>1</StartAt>
    </WorkingHour>
  </WorkingHours>
</AddBusinessModelOld>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'AddBusinessModelOld'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.