organizations (Level 3 API Key)
Organizations
Retrieve organizations, Requires an apikey of level 3
Filter
name | example | Typ |
---|---|---|
orgnumber | orgnumber=556016-0680 | String |
customernumber | customernumber=14 | String |
Request
HTTP GET /organization
Example:
APIURL/organizations.xml?apikey=338934897438
Response
Tag | Format | Example | Description |
---|---|---|---|
organizations |
| <organizations> | organizations-tag encloses organizations |
organization |
| <organization> | Represents a organization |
id | ID | <id>12</id> | Unique ID |
businessunitid | ID | <businessunitid>34</businessunitid> | The business unit/facility the organization is connected to |
name | String | <name>Organization</name> | Name of the organization |
orgnumber | String | <orgnumber>5566778998</orgnumber> | The organizationnumber of the organization |
customernumber | String | <customernumber>14</customernumber> | The customernumber of the organization |
String | <email>aaa.bbb@org.nu</email> | ||
invoiceemail | String | <invoiceemail>a.b@org.nu</invoiceemail> | Invoice email |
phone | String | <phone>013-223344</phone> | Phonenumber |
pricelist | <pricelist><id>545</id><name>Pricelistname</name></pricelist> | Price list used for the organization. These are listed by an ID in the BRP klient under Products - Settings - Price lists | |
discount | Number | <discount>1250</discount> | An across the board rebate for the organization. A rebate of 12,5% is entered as 1250. Please note that other prices may be used due to other combinations of price lists and rebates set on for example an organization. If price lists are used the final price will be a rebated price list price. |
creditlimit | Number | <creditlimit>100000</creditlimit> | Credit limit in cents/ören. 60000 = 600,00 SEK |
customerresponsible | <customerresponsible><id>33</id><firstname>John</firstname> <lastname>Doe</lastname></customerresponsible> | Customerresponsible | |
mailaddress | <mailaddress><street>Storgatan 1</street><postalcode>12345</postalcode><city>Farsta</city><country>SE</country></mailaddress> | The mailaddress of the organization. | |
invoiceaddress | <invoiceaddress><street>Storgatan 2</street><postalcode>12345</postalcode><city>Farsta</city><country>SE</country></invoiceaddress> | The invoiceaddress of the organization. | |
invoicereference | <invoicereference><id>33</id><firstname>John</firstname> <lastname>Doe</lastname></invoicereference> | The invoice reference for the organization. | |
organizationgroups | <organizationgroups><organizationgroup><id>1</id><name>Groupname1</name></organizationgroup></<organizationgroups> | Groups that the organization belongs to. | |
invoicedistributionmethod | String | <invoicedistributionmethod>email</invoicedistributionmethod> | Invoice distribution method. Valid values are "email" and "centralPrint21Grams" |
<organizations> <organization> <id>12</id> <name>Main Street Gym</name> <businessunitid>666</businessunitid> <orgnumber>12345567889</orgnumber> <customernumber>14</customernumber> <email>a.b@c.se</email> <invoiceemail>d.e@f.se</invoiceemail> <phone>013-212233</phone> <pricelist> <id>545</id> <name>Pricelistname</name> </pricelist> <discount>2000</discount> <creditlimit>100000</creditlimit> <mailaddress> <street>Storgatan 1</street> <postalcode>12345</postalcode> <city>Farsta</city> <country>SE</country> </mailaddress> <invoiceaddress> <street>Storgatan 2</street> <postalcode>12345</postalcode> <city>Farsta</city> <country>SE</country> </invoiceaddress> <invoicereference> <id>33</id> <firstname>John</firstname> <lastname>Doe</lastname> </invoicereference> <invoicedistributionmethod>email</invoicedistributionmethod> <organizationgroups> <organizationgroup> <id>1</id> <name>Groupname1</name> </organizationgroup> <organizationgroup> <id>6</id> <name>Groupname2</name> </organizationgroup> </organizationgroups> </businessunit> </businessunits>
Create organization
Creates an organization. Requires an apikey of level 3.
Request
POST:APIURL/organizations.xml apikey=338934897438 businessunitid=1 name=Organizationname orgnumber=12345567889 email=a.b@c.se
Parameters
Name | Example | Description | Datatype | Required |
---|---|---|---|---|
name | name=Organizationname | Organizationname | String | X |
businessunitid | businessunitid=1 | The business unit/facility the organization should be connected to | ID | X |
orgnumber | orgnumber=556056-6258 | Organizationnumber. Must be a valid organizationnumber | Integer | - |
email=aaa.bbb@org.nu | - | |||
invoiceemail | invoiceemail=a.b@org.nu | Invoiceemail | - | |
phone | phone=013-223344 | Phonenumber | String | - |
pricelistid | pricelistid=33 | Pricelist for the organization. These are listed by an ID in the BRP klient under Products - Settings - Price lists | ID | - |
discount | discount=1250 | An across the board rebate for the organization. A rebate of 12,5% is entered as 1250. Please note that other prices may be used due to other combinations of price lists and rebates set on for example an organization. If pricelists are used the final price will be a rebated pricelist price. | - | |
creditlimit | creditlimit=100000 | Credit limit in cents/ören. 60000 = 600,00 SEK | Number | - |
mailaddressstreet | mailaddressstreet=Lantbruksgatan 13 | Mailaddress, street | String | - |
mailaddresspostalcode | mailaddresspostalcode=58336 | Mailaddress, postal code | String | - |
mailaddresscity | mailaddresscity=Linköping | Mailaddress, city | String | - |
mailaddresscountry | mailaddresscountry=SE | Mailaddress, country | String | - |
invoiceaddressstreet | invoiceaddressstreet=Lantbruksgatan 13 | Invoiceaddress, street | String | - |
invoiceaddresspostalcode | invoiceaddresspostalcode=58336 | Invoiceaddress, postal code | String | - |
invoiceaddresscity | invoiceaddresscity=Linköping | Invoiceaddress, city | String | - |
invoiceaddresscountry | invoiceaddresscountry=SE | Invoiceaddress, country | String | - |
invoicereference | invoicereference=1 | Person id of the invoice reference. Setting this to 0 during modify organization removes the invoice reference. | ID | |
organizationgroups | organizationgroups=1,2 | Comma separated list of groups to which the organization should belong | String | |
invoicedistributionmethod | invoicedistributionmethod=email | Invoice distribution method |
Response
The same as for listing the organization
Modify organization
Modifies an existing organization. Requireds an apikey of level 3.
Request
PUT:APIURL/organizations.xml apikey=338934897438 id=1 name=someOtherOrganizationName
Parameters
Same as for "Create organization" except that the id of the organization to modify is mandatory
Name | Example | Description | Datatype | Required |
---|---|---|---|---|
id | id=1 | Organization id | ID | X |
Response
The same as the listing of the organization