Cdn Public Collector's Pricing Guide (CPG) API V2

<back to all web services

GetNodeRequest

Catalog

Retrieve a node

The following routes are available for this service:
GET/GetNodeRequestWhen NodeChildrenCountLive > 0 then this is a leaf node and has Node children. If CollectibleChildrenCountLive > 0 then the node has collectible children. There is no advanced APi version for this call.
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BaseResponse:
    total: int = 0
    op_code: int = 0
    error_text: Optional[str] = None
    request_time: Optional[str] = None
    response_time: Optional[str] = None
    total_execution_time: Optional[str] = None
    cached_response: bool = False
    permit_access: bool = False
    access_denied_message: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class NodeDto:
    id: int = 0
    name: Optional[str] = None
    description: Optional[str] = None
    featured_image_url: Optional[str] = None
    featured_image_attribution: Optional[str] = None
    flag_code: Optional[str] = None
    country_name: Optional[str] = None
    sorting_position: int = 0
    node_children_count_live: int = 0
    collectible_children_count_live: int = 0
    parent_node__id: Optional[int] = None
    root_node__id: Optional[int] = None
    child_nodes: Optional[List[NodeDto]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class NodeResponse(BaseResponse):
    data: Optional[List[NodeDto]] = None


# @Api(Description="Retrieve a node")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetNodeRequest:
    """
    Retrieve a node
    """

    node_id: int = 0

Python GetNodeRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /GetNodeRequest HTTP/1.1 
Host: cpgpublicapiv2dev.greysheet.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<NodeResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Cdn.PublicApiV2.ResponseObjects">
  <AccessDeniedMessage>String</AccessDeniedMessage>
  <CachedResponse>false</CachedResponse>
  <ErrorText>String</ErrorText>
  <OpCode>0</OpCode>
  <PermitAccess>false</PermitAccess>
  <RequestTime>String</RequestTime>
  <ResponseTime>String</ResponseTime>
  <Total>0</Total>
  <TotalExecutionTime>String</TotalExecutionTime>
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/Cdn.PublicApiV2.Dto">
    <d2p1:NodeDto>
      <d2p1:ChildNodes>
        <d2p1:NodeDto>
          <d2p1:ChildNodes>
            <d2p1:NodeDto>
              <d2p1:ChildNodes i:nil="true" />
              <d2p1:CollectibleChildrenCountLive>0</d2p1:CollectibleChildrenCountLive>
              <d2p1:CountryName>String</d2p1:CountryName>
              <d2p1:Description>String</d2p1:Description>
              <d2p1:FeaturedImageAttribution>String</d2p1:FeaturedImageAttribution>
              <d2p1:FeaturedImageUrl>String</d2p1:FeaturedImageUrl>
              <d2p1:FlagCode>String</d2p1:FlagCode>
              <d2p1:Id>0</d2p1:Id>
              <d2p1:Name>String</d2p1:Name>
              <d2p1:NodeChildrenCountLive>0</d2p1:NodeChildrenCountLive>
              <d2p1:ParentNode_Id>0</d2p1:ParentNode_Id>
              <d2p1:RootNode_Id>0</d2p1:RootNode_Id>
              <d2p1:SortingPosition>0</d2p1:SortingPosition>
            </d2p1:NodeDto>
          </d2p1:ChildNodes>
          <d2p1:CollectibleChildrenCountLive>0</d2p1:CollectibleChildrenCountLive>
          <d2p1:CountryName>String</d2p1:CountryName>
          <d2p1:Description>String</d2p1:Description>
          <d2p1:FeaturedImageAttribution>String</d2p1:FeaturedImageAttribution>
          <d2p1:FeaturedImageUrl>String</d2p1:FeaturedImageUrl>
          <d2p1:FlagCode>String</d2p1:FlagCode>
          <d2p1:Id>0</d2p1:Id>
          <d2p1:Name>String</d2p1:Name>
          <d2p1:NodeChildrenCountLive>0</d2p1:NodeChildrenCountLive>
          <d2p1:ParentNode_Id>0</d2p1:ParentNode_Id>
          <d2p1:RootNode_Id>0</d2p1:RootNode_Id>
          <d2p1:SortingPosition>0</d2p1:SortingPosition>
        </d2p1:NodeDto>
      </d2p1:ChildNodes>
      <d2p1:CollectibleChildrenCountLive>0</d2p1:CollectibleChildrenCountLive>
      <d2p1:CountryName>String</d2p1:CountryName>
      <d2p1:Description>String</d2p1:Description>
      <d2p1:FeaturedImageAttribution>String</d2p1:FeaturedImageAttribution>
      <d2p1:FeaturedImageUrl>String</d2p1:FeaturedImageUrl>
      <d2p1:FlagCode>String</d2p1:FlagCode>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:Name>String</d2p1:Name>
      <d2p1:NodeChildrenCountLive>0</d2p1:NodeChildrenCountLive>
      <d2p1:ParentNode_Id>0</d2p1:ParentNode_Id>
      <d2p1:RootNode_Id>0</d2p1:RootNode_Id>
      <d2p1:SortingPosition>0</d2p1:SortingPosition>
    </d2p1:NodeDto>
  </Data>
</NodeResponse>