API CreateBranch: Porovnání verzí

Z Podpora.nextis.cz
Přejít na: navigace, hledání
 
(Není zobrazeno 5 mezilehlých verzí od 2 dalších uživatelů.)
Řádka 1: Řádka 1:
 
==== Description ====
 
==== Description ====
Provides functionality to manage branches within your company. Minimum count of branches is 1 and maximum is not specified (there's no limitation).
+
Method allows You to create new branch in system.
  
 
==== Exact name ====
 
==== Exact name ====
Řádka 6: Řádka 6:
  
 
==== Type ====
 
==== Type ====
Standard executable stored procedure
+
Standard executable stored procedure.
  
 
==== Specification ====
 
==== Specification ====
Řádka 19: Řádka 19:
 
|int
 
|int
 
|
 
|
|Workshop ID  
+
|ID of workshop from workshop list (see relation)
(could be equal to ID in Your internal system)
 
 
|API_GetWorkshops.ID
 
|API_GetWorkshops.ID
 
|-
 
|-
Řádka 26: Řádka 25:
 
|nvarchar(100)
 
|nvarchar(100)
 
|
 
|
|Workshop name
+
|Branch name
 
|
 
|
 
|-
 
|-
Řádka 32: Řádka 31:
 
|nvarchar(200)
 
|nvarchar(200)
 
|
 
|
|
+
|Street
 
|
 
|
 
|-
 
|-
Řádka 38: Řádka 37:
 
|nvarchar(120)
 
|nvarchar(120)
 
|
 
|
|
+
|City
 
|
 
|
 
|-
 
|-
Řádka 44: Řádka 43:
 
|nvarchar(15)
 
|nvarchar(15)
 
|
 
|
|
+
|ZIPCode
 
|
 
|
 
|-
 
|-
Řádka 50: Řádka 49:
 
|nvarchar(70)
 
|nvarchar(70)
 
|
 
|
|
+
|Country
 
|
 
|
 
|-
 
|-
Řádka 56: Řádka 55:
 
|nvarchar(70)
 
|nvarchar(70)
 
|
 
|
|
+
|Region
 
|
 
|
 
|-
 
|-
Řádka 62: Řádka 61:
 
|nvarchar(80)
 
|nvarchar(80)
 
|
 
|
|
+
|State
 
|
 
|
 
|-
 
|-
Řádka 68: Řádka 67:
 
|int
 
|int
 
|
 
|
|ID of country
+
|ID of country from country list (see relation)
 
|API_GetCountry.ID
 
|API_GetCountry.ID
 
|-
 
|-
Řádka 101: Řádka 100:
 
|
 
|
 
|}
 
|}
 +
 +
==== Return ====
 +
0 : OK
 +
100 : Item could not be created
  
 
==== Example ====
 
==== Example ====
 
<syntaxhighlight lang="sql">
 
<syntaxhighlight lang="sql">
EXEC [API_CreateBranch] @WorkshopID = 1 ,@Name = 'Name' ,@Street = 'Street' ,@City = 'City' ,@ZIPCode = 'ZIPCode' ,@Country = 'Country' ,@Region = 'Region' ,@State ='Česká republika' ,@StateID = 15797 ,@Phone = '+420 556 621 300' ,@Fax = '+420 596 790 789' ,@MobilePhone = '+420 556 621 301' ,@Email = 'info@nextis.cz' ,@Web = 'www.nextis.cz'
+
DECLARE @return_value int
 +
EXEC @return_value = [API_CreateBranch] @WorkshopID = 1 ,@Name = 'Name' ,@Street = 'Street' ,@City = 'City' ,@ZIPCode = 'ZIPCode' ,@Country = 'Country' ,@Region = 'Region' ,@State ='Česká republika' ,@StateID = 15797 ,@Phone = '+420 556 621 300' ,@Fax = '+420 596 790 789' ,@MobilePhone = '+420 556 621 301' ,@Email = 'info@nextis.cz' ,@Web = 'www.nextis.cz'
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
==== Notices ====
 
==== Notices ====
Any notices.
+
None.

Aktuální verze z 20. 9. 2017, 14:53

Description

Method allows You to create new branch in system.

Exact name

API_CreateBranch

Type

Standard executable stored procedure.

Specification

Parameter Data type Value range Description Relation
@WorkshopID int ID of workshop from workshop list (see relation) API_GetWorkshops.ID
@Name nvarchar(100) Branch name
@Street nvarchar(200) Street
@City nvarchar(120) City
@ZIPCode nvarchar(15) ZIPCode
@Country nvarchar(70) Country
@Region nvarchar(70) Region
@State nvarchar(80) State
@StateID int ID of country from country list (see relation) API_GetCountry.ID
@Phone nvarchar(50) Phone
@Fax nvarchar(50) Fax
@MobilePhone nvarchar(50) Mobile phone
@Email nvarchar(70) Email
@Web nvarchar(120) Web address

Return

0 : OK
100 : Item could not be created

Example

DECLARE @return_value int
EXEC @return_value = [API_CreateBranch] @WorkshopID = 1 ,@Name = 'Name' ,@Street = 'Street' ,@City = 'City' ,@ZIPCode = 'ZIPCode' ,@Country = 'Country' ,@Region = 'Region' ,@State ='Česká republika' ,@StateID = 15797 ,@Phone = '+420 556 621 300' ,@Fax = '+420 596 790 789' ,@MobilePhone = '+420 556 621 301' ,@Email = 'info@nextis.cz' ,@Web = 'www.nextis.cz'

Notices

None.