/
Valuecards

Valuecards

Valuecards

List valuecards

Lists both single purpose and multi-purpose valuecards that the logged on user has access to.

Call

HTTP GET /valuecards

Filter

Name

Value

Description

Datatype

numbernumber=234Individual number of valuecard.String

productid

productid=62

Retrieves only valuecards valid for current product.

ID

Example:

APIURL/valuecards.xml?apikey=338934897438&number=234

Response

Tag

Format

Example

Description

valuecards

 

< valuecards >

The valuecard tag encloses the valuecard.

valuecard

 

<valuecard>

Represents a specific valuecard.

id

ID

<id>23</id>

Unique ID

numberString<number>58</number>Value card number

businessunit

 

<businessunit><id>11</id><name>Center</name></businessunit>

Business unit/facility

customer

String

<customer>Moa Martinsson</customer>

Registered owner/customer

type

String

<type>10 x schampo0</type>

Type

isamounttypeBoolean<isamounttype>true</isamounttype>True if the value card is multi-purpose (gift card). A value card can be either multi-purpose such as a gift card valid for 2 000 SEK, or single purpose valid for 10 personal trainer sessions.

totalamount

Integer

<totalamount>60000</totalamount>

Total amount in cents/ören. 60000 = 600,00 SEK

totalamountleft

Integer

<totalamountleft>54000</totalamountleft>

Remaining amount in cents/ören.

discountleft

Integer

<discountleft>0</discountleft>

Rebate remaining in cents/ören

totalunits

Integer

<totalunits>10</totalunits>

Totalt number of units

totalunitsleft

Integer

<totalunitsleft>9</totalunitsleft>

Total number of units remaining

created

Time

<created>2012-05-15 00:00</created>

Created

validfrom

Date

<validfrom>2012-05-15</validfrom>

Valid from

validuntil

Date

<validuntil>2013-05-15</validuntil>

Valid until

barcode

Integer

<barcode>9297745739160472</barcode>

Barcode

datacarriers

Strings

<datacarriers><datacarrier><uid>123789</uid></datacarrier></datacarriers>

All data-carriers associated with the valuecard

valuecardproduct <valuecardproduct><id>11</id><name>10 x schampoo</name></valuecardproduct>The valuecard product
<valuecards>
  <valuecard>
    <id>50</id>
    <number>58</number>
    <businessunit>
      <id>2</id>
      <name>BRP Systems</name>
    </businessunit>
    <customer>Moa Martinsson</customer>
    <type>10 x schampoo</type>
    <totalamount>60000</totalamount>
    <totalamountleft>54000</totalamountleft>
    <discountleft>0</discountleft>
    <totalunits>10</totalunits>
    <totalunitsleft>9</totalunitsleft>
    <created>2012-05-15 00:00</created>
    <validfrom>2012-05-15</validfrom>
    <validuntil>2013-05-15</validuntil>
	<datacarriers>
		<datacarrier>
			<uid>9297745739160472</uid>
		</datacarrier>
		<datacarrier>
			<uid>123123123</uid>
		</datacarrier>
	</datacarriers>
	<valuecardproduct>
      <id>2</id>
      <name>10 x schampoo</name>
    </valuecardproduct>
  </valuecard>
</valuecards>

 

Update valuecard

Update an existing valuecard. Only changing the data-carriers is supported at the moment.

Call

HTTP PUT /valuecards

Parameters

Name

Value

Description

Datatype

 
numbernumber=234Individual number of valuecard.StringEither number or productid is mandatory

id

id=62

Database id of the valuecard

ID

Either number or productid is mandatory
datacarriersdatacarriers=12,20,22Comma-separated list of datacarriers to associate with the valuecardStringNote that any carriers associated with the valuecard not in the list will be removed from the valuecard

 

Example:

APIURL/valuecards.xml?apikey=338934897438&number=234&datacarriers=1,2

Response

As in list

If a datacarrier is already in use in the system an error saying this will be returned.

 

 

Related content

Value Cards in App
Value Cards in App
More like this
Value Cards on Mobility Web
Value Cards on Mobility Web
Read with this
cardreaders
cardreaders
More like this
passagetries
passagetries
More like this
organizations (Level 3 API Key)
organizations (Level 3 API Key)
More like this
paymentcertificates
paymentcertificates
More like this