Website logo

Creates a partnership agreement

Creates a depth commitment contract. An agreement between an agency (member) and Trade Me, to upgrade all listings of a matched criteria, to a set level of depth product.

URL: https://api.trademe.co.nz/v1/Property/PartnershipAgreements.{file_format}
HTTP Method: POST
Requires Authentication? Yes
Permission Required: PropertyB2BInternalServicesWrite: Oidc write permission for Customer Broker Api
Supported Formats: XML, JSON
Rate Limited? Yes

URL parameters

file_format Enumeration (required) The format of the response.
xml Serialize responses into XML.
json Serialize responses into JSON.

POST Data

<CommitmentContractRequest>

CrmId String (required)

The external ID of the contract from the source system

MemberId Integer (required)

The member ID of the agency for which this contract applies

StartDate DateTime (optional)

The start date of the contract. If not supplied, this will be defaulted to the current date

EndDate DateTime (optional)

The end date of the contract. If not supplied, the contract will not expire

ItemCode String (required)

The financial item code for the depth product applied to listings as part of this contract. This will be used for invoicing purposes

InvoiceLine String (required)

The descriptive invoice line for the depth product applied to listings as part of this contract

PaymentType String (required)

The payment type for the depth product applied to listings as part of this contract

ListingFee Boolean (optional)

If true, when a listing is created while this contract is in effect, the listing fee (or base fee) will not be charged. If false, the listing fee will continue to be charged

FeatureCombo Boolean (optional)

If true, Feature Combo will be applied to listings subject to this contract

PackageCode String (optional)

The code of any package that are applied to listings subject to this contract

CategoryIds Collection of Integer (required)

The listing categories in which this contract will apply

ListingExtras Collection of <ListingExtras> (optional)

The listing extras that are applied to listings subject to this contract

Name String (required)

The name of the extra.

Variant String (required)

The variation of the extra. For example this could determine the duration, delay, or configuration of the listing extra.

AutoApplyPremiumPackage Boolean (optional)

Flag for whether the PA is NOT Flexi or Flexi (true = Not Flexi)

Returns

<CommitmentContractResponse>

Success Boolean

Indicates whether the operation was successful.

Description String or null

The description of the error, if the operation failed.

CommitmentContractId Integer

The internal ID of the commitment contract

Example XML Request (switch to JSON)

<CommitmentContractRequest xmlns="http://api.trademe.co.nz/v1">
  <CrmId>ABC</CrmId>
  <MemberId>123</MemberId>
  <StartDate>2018-01-01T00:00:00Z</StartDate>
  <EndDate>2018-01-01T00:00:00Z</EndDate>
  <ItemCode>ABC</ItemCode>
  <InvoiceLine>ABC</InvoiceLine>
  <PaymentType>ABC</PaymentType>
  <ListingFee>false</ListingFee>
  <FeatureCombo>false</FeatureCombo>
  <PackageCode>ABC</PackageCode>
  <CategoryIds>
    <ListingExtra>123</ListingExtra>
    <ListingExtra>123</ListingExtra>
  </CategoryIds>
  <ListingExtras>
    <ListingExtras>
      <Name>ABC</Name>
      <Variant>ABC</Variant>
    </ListingExtras>
    <ListingExtras>
      <Name>ABC</Name>
      <Variant>ABC</Variant>
    </ListingExtras>
  </ListingExtras>
  <AutoApplyPremiumPackage>false</AutoApplyPremiumPackage>
</CommitmentContractRequest>

Example JSON Request (switch to XML)

{
  "CrmId": "ABC",
  "MemberId": 123,
  "StartDate": "\/Date(1514764800)\/",
  "EndDate": "\/Date(1514764800)\/",
  "ItemCode": "ABC",
  "InvoiceLine": "ABC",
  "PaymentType": "ABC",
  "ListingFee": false,
  "FeatureCombo": false,
  "PackageCode": "ABC",
  "CategoryIds": [
    123,
    123
  ],
  "ListingExtras": [
    {
      "Name": "ABC",
      "Variant": "ABC"
    },
    {
      "Name": "ABC",
      "Variant": "ABC"
    }
  ],
  "AutoApplyPremiumPackage": false
}

Example XML Response (switch to JSON)

<CommitmentContractResponse xmlns="http://api.trademe.co.nz/v1">
  <Success>false</Success>
  <Description>ABC</Description>
  <CommitmentContractId>123</CommitmentContractId>
</CommitmentContractResponse>

Example JSON Response (switch to XML)

{
  "Success": false,
  "Description": "ABC",
  "CommitmentContractId": 123
}