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

<back to all web services

GetNodeChildrenRequest

Catalog

Retrieve node children for a given node

The following routes are available for this service:
GET/GetNodeChildrenRequestThis will return no data for those nodes with 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 node children for a given node")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetNodeChildrenRequest:
    """
    Retrieve node children for a given node
    """

    node_id: Optional[int] = None

Python GetNodeChildrenRequest DTOs

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

HTTP + OTHER

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

GET /GetNodeChildrenRequest HTTP/1.1 
Host: publicapiv2dev.greysheet.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Data":[{"Id":0,"Name":"String","Description":"String","FeaturedImageUrl":"String","FeaturedImageAttribution":"String","FlagCode":"String","CountryName":"String","SortingPosition":0,"NodeChildrenCountLive":0,"CollectibleChildrenCountLive":0,"ParentNode_Id":0,"RootNode_Id":0,"ChildNodes":[{"Id":0,"Name":"String","Description":"String","FeaturedImageUrl":"String","FeaturedImageAttribution":"String","FlagCode":"String","CountryName":"String","SortingPosition":0,"NodeChildrenCountLive":0,"CollectibleChildrenCountLive":0,"ParentNode_Id":0,"RootNode_Id":0,"ChildNodes":[{"Id":0,"Name":"String","Description":"String","FeaturedImageUrl":"String","FeaturedImageAttribution":"String","FlagCode":"String","CountryName":"String","SortingPosition":0,"NodeChildrenCountLive":0,"CollectibleChildrenCountLive":0,"ParentNode_Id":0,"RootNode_Id":0}]}]}],"Total":0,"OpCode":0,"ErrorText":"String","RequestTime":"String","ResponseTime":"String","TotalExecutionTime":"String","CachedResponse":false,"PermitAccess":false,"AccessDeniedMessage":"String"}